dang! found some problems in the coloring stuff....
relay a single word that's in the coloring lists
like.... clan, omni, aqua or blue for instance it outputs
Testbot: [Test] Testchar: ##hrelayone_messageend##
the end## part comes in the color I just relayed the name of.
Here's the function:
/*
This gets called on commands in the external privgroup
*/
function extpgmsg($pgroup, $name, $msg)
{
foreach($this -> relays as $relaynum => $relayname)
{
$fsyntax = $this -> bot -> settings -> get('HRelay'.$relaynum, 'farSyntax');
//if (preg_match("/^" . $this -> bot -> commpre . "agcr /im", $msg) &&
if (preg_match("/^" . $fsyntax . "agcr /im", $msg) &&
$this -> bot -> settings -> get('HRelay'.$relaynum, 'Status') &&
strtolower($this -> bot -> settings -> get('HRelay'.$relaynum, 'Relay')) == strtolower($pgroup))
/*
if (preg_match("/^" . $this -> bot -> commpre . "agcr /im", $msg) &&
$this -> bot -> settings -> get('HRelay'.$relaynum, 'Status'))
*/
{
$parts = explode(' ', $msg);
unset($parts[0]);
$txt = implode(' ', $parts);
/* Hyde: parse out the Channel, Name and Message text, colorize it using the hrelayone colors */
if (preg_match("/\[<font color=#[ABCDEFabcdef0-9]{6}>([^\]]*)<\/font>\] <font color=#[ABCDEFabcdef0-9]{6}>([^\ ]*):<\/font> <font color=#[ABCDEFabcdef0-9]{6}>(.*)<\/font>$/", $txt, $matches) ||
{
$txtirc = "[" . $matches[1] . "]" . $matches[2] . ": " . $matches[3];
$txt_channel = ("##hrelay".$relayname."_channel##" . $matches[1] . "##end##");
$txt_name = ("##hrelay".$relayname."_name##" . $matches[2] . "##end##");
$txt_message = ("##hrelay".$relayname."_message##" . $matches[3] . "##end##");
$txt = "[" . $txt_channel . "] " . $txt_name . ": " . $txt_message;
}
if ($this -> bot -> settings -> get('HRelay'.$relaynum, 'Inc') == "Both" || $this -> bot -> settings -> get('HRelay'.$relaynum, 'Inc') == "Guildchat")
{
$this -> bot -> send_gc($txt);
}
if ($this -> bot -> settings -> get('HRelay'.$relaynum, 'Inc') == "Both" || $this -> bot -> settings -> get('HRelay'.$relaynum, 'Inc') == "Privgroup")
{
$this -> bot -> send_pgroup($txt);
}
if ($this -> bot -> settings -> get('HRelay'.$relaynum, 'Irc') == TRUE)
{
$this -> relay_to_irc2($txtirc);
}
}
}
}