BeBot - An Anarchy Online and Age Of Conan chat automaton

General => Feedback and Suggestions => Topic started by: keirou on March 10, 2009, 02:26:32 am

Title: Battlekeeps in AoC
Post by: keirou on March 10, 2009, 02:26:32 am
[GROUP]   [MSG]   [Third Time Lucky] Bustydemons: if you get a tank i can bring my ToS to help with option 2 and 3
[GROUP]   [MSG]   [Third Time Lucky] <remoteformat id="113577031" category="100" key="m@@!?CE%Uu+8Kxa9-B?\" knubot="0"  ><parameter value="6;&lt;remoteformat id=&quot;3&quot; category=&quot;50100&quot; key=&quot;oQ0sL&amp;quot;D@uZi8ygL4Yty@&quot; knubot=&quot;0&quot;  &gt;&lt;/remoteformat&gt;" /></remoteformat>

This is what happens when

[10:23] [Guild] [Bustydemons]: if you get a tank i can bring my ToS to help with option 2 and 3
[10:23] [Guild] Caelnach will be vulnerable for attack in 24 hours.

happens in game.
any way it can be cleaned up in bot log? or even removed?
Title: Re: Battlekeeps in AoC
Post by: keirou on March 12, 2009, 08:24:41 am
*bump*
Title: Re: Battlekeeps in AoC
Post by: Alreadythere on March 12, 2009, 11:06:05 am
Not sure if it could easily be cleaned up, but filtering shouldn't be that hard. You'd have to add a check on inc_gsmg() for chat of no user starting with <remoteformat I guess.

Try adding the following after the line $args[2] = utf8_decode($args[2]); and before the directly following line if (isset($this -> commands["gmsg"][$group]) || $group == $this -> guildname || ($this -> game == "aoc" && $group == "~Guild")) in the inc_gmsg() function:
Code: [Select]
if ($args[1] == 0 && $this -> game == "aoc" && $group == "~Guild")
{
$parts = explode(" ", $args[2]);
if ($parts[0] == '<remoteformat')
return;
}
This code is untested though.
Title: Re: Battlekeeps in AoC
Post by: keirou on March 13, 2009, 07:44:40 am
without sounding like a complete noob... how?
Title: Re: Battlekeeps in AoC
Post by: Alreadythere on March 13, 2009, 05:25:11 pm
Make a backup of Sources/Bot.php
Open Sources/Bot.php in a text editor, notepad will do for this.
Add my code at the place mentioned above - first search for function inc_gmsg, then for the lines mentioned. Make sure you are at the right position.
After inserting the code save the file and restart the bot.

Good luck ;)
Title: Re: Battlekeeps in AoC
Post by: keirou on March 13, 2009, 07:06:41 pm
so
Code: [Select]
/*
* Incoming group message (Guildchat, towers etc)
*/
function inc_gmsg($args)
{
$found = false;

$group = $this -> core("chat") -> lookup_group($args[0]);

if (!$group)
{
$group = $this -> core("chat") -> get_gname($args[0]);
}

$args[2] = utf8_decode($args[2]);

if (isset($this -> commands["gmsg"][$group]) || $group == $this -> guildname || ($this -> game == "aoc" && $group == "~Guild"))

becomes

Code: [Select]
/*
* Incoming group message (Guildchat, towers etc)
*/
function inc_gmsg($args)
{
$found = false;

$group = $this -> core("chat") -> lookup_group($args[0]);

if (!$group)
{
$group = $this -> core("chat") -> get_gname($args[0]);
}

$args[2] = utf8_decode($args[2]);
if ($args[1] == 0 && $this -> game == "aoc" && $group == "~Guild")
{
$parts = explode(" ", $args[2]);
if ($parts[0] == '<remoteformat')
return;
}
if (isset($this -> commands["gmsg"][$group]) || $group == $this -> guildname || ($this -> game == "aoc" && $group == "~Guild"))
Title: Re: Battlekeeps in AoC
Post by: Alreadythere on March 13, 2009, 07:36:38 pm
Yes.
Title: Re: Battlekeeps in AoC
Post by: WeZoN on June 01, 2009, 06:24:17 pm
bump!

any luck with this?
SimplePortal 2.3.7 © 2008-2024, SimplePortal