BeBot - An Anarchy Online and Age Of Conan chat automaton

Archive => Anarchy Online Archive => BeBot 0.4 support => Topic started by: vertek on September 14, 2007, 03:25:23 am

Title: !help
Post by: vertek on September 14, 2007, 03:25:23 am
I'm curious.. I'm wanting to make !help viable from gc, though I cannot find any resources on how to make that change..

could someone shed some light on this pls?
Title: Re: !help
Post by: Blueeagle on September 14, 2007, 03:43:01 am
This is a remnance from my laziness when revamping and testing the module. To add responses from gc change the lines of core/BotHelp.php from

Code: [Select]
$bothelp_core = new BotHelp_Core($bot);


$commands["tell"]["help"] = &$bothelp_core;

$bot -> help = &$bothelp_core;

to read
Code: [Select]
$bothelp_core = new BotHelp_Core($bot);


$commands["tell"]["help"] = &$bothelp_core;
$commands["gc"]["help"] = &$bothelp_core;
$commands["pgmsg"]["help"] = &$bothelp_core;

$bot -> help = &$bothelp_core;

That should enable help in gc and pgmsg. However it will always reply in tells to the person executing the command. To change this you'll need to change the code in the functions "gc" and "pgmsg" further down. They should be identical to the function "tell" except for $this -> bot -> send_tell( should read $this->bot->send_gc( and $this->bot->send_pgmsg( respectively

Edit: However I think it prudent that !help only replies in tells as the output of the command depends on the access level of the person issuing the command.
Title: Re: !help
Post by: Blueeagle on September 14, 2007, 03:44:45 am
Also be sure to modify the access control settings for GC and PGMSG.
Title: Re: !help
Post by: Blueeagle on September 14, 2007, 03:54:08 am
Added support for GC and PGMSG to the SVN.

Replies are still sendt in tells.
Title: Re: !help
Post by: Blueeagle on September 14, 2007, 04:23:31 am
I cannot find any resources on how to make that change..

The best resource to look into would probably be modules/_ExampleModule.php but if you're new to coding I can understand how that would be all greek. :)
SimplePortal 2.3.7 © 2008-2024, SimplePortal