BeBot - An Anarchy Online and Age Of Conan chat automaton
Development => Coding and development discussion => Topic started by: Diablo on March 01, 2008, 07:31:55 am
-
I am needing some help on how to change the relay module so that certain syntax like @ when set wont be relayed to other bots but only shows in the main org bot that it was typed in. I tried putting preg_match in so it wouldnt send the gcr out in front of message would this be best way to do this.
-
a better way would be
If($msg[0] == "@")
{
Return;
}
Prob at top of the function that handles none commands.
You should also use settings so you can easily change it instead of it being coded as@
-
i tried this code but not exactly sure where best place to put in the relay_guild module.
This should check another module for Syntax and if its there should not realy the chat.
if (preg_match("/^" . $this -> bot -> settings -> get ('HRelay1', 'nearSyntax') . " (.+)/i", $msg))