BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => BeBot 0.3 support => Topic started by: Nytridr on April 29, 2007, 08:07:37 pm
-
when people log on they are sent the !online like 15 to 20 times.. doing the shared database with the latest svn updates
dwbot1 [2007-04-29 18:00:33] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:00:38] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
dwbot1 [2007-04-29 18:00:38] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:00:42] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
dwbot1 [2007-04-29 18:00:42] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:00:46] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
dwbot1 [2007-04-29 18:00:46] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:00:51] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
dwbot1 [2007-04-29 18:00:51] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:00:55] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
dwbot1 [2007-04-29 18:00:56] [TELL] [OUT] -> Trukhack: /tell dwbot1 !help
dwbot1 [2007-04-29 18:01:04] [TELL] [OUT] -> Trukhack: 34 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
-
What exactly are you doing?
-
logging on..
-
I think I found it.. I had a custom IRC file inplace and with the new updates and such it was causing tons of errors even out of memory errors and loops and what not.. I seen it go from 11,000k ram usage to 22000k ram usage in just 10 mins.. once I put back in the standard irc file it fixed everything.. so I am thinking there is something in what I have changed that is causing all these problems.
nope still doing it.. so IDK what is going on..
-
Try renaming modules/LogonNotify_GUILD.php to modules/_LogonNotify_GUILD.php.
If the error is gone then I know at least where to look, didn't have time to check myself yet and won't manage before tomorrow.
-
here is another problem I am seeing also.. tried to send a massmsg to let everyone know to let me know if they get spammed again.. and it didnt work..
rsbot [2007-05-01 13:57:31] [TELL] [OUT] -> Aofbot: Mass message beeing s
ent. Please stand by...
Warning: array_keys(): The first argument should be an array in C:\aobots\RS\rsb
ot\modules\MassMsg.php on line 118
could be because I already renamed that.. didnt check it before hand.. but will later..
okay not sure if it is still doing it since even before it seems like it would do it to some while others didnt get it.. seems kind of random who got it.. but so far I have logged 3 of my toons and have not been spammed with it..
rsbot [2007-05-01 14:04:36] [BUDDY] [LOG] Nytridra logged [on] (OWNER)
rsbot [2007-05-01 14:04:37] [GROUP] [MSG] [Rising Sun (AoF)] Rsbot: "Nytri
dra" (Lvl 164 / 9 (Mediocre) Agent Squad Commander) logged on :: [link]Metanyt's
Alts[/link]
rsbot [2007-05-01 14:04:45] [TELL] [OUT] -> Nytridra: 13 members online i
n Guild. 0 members in Privategroup. :: [link]click to view[/link]
rsbot [2007-05-01 14:04:45] [TELL] [OUT] -> Nytridra: /tell rsbot !help
okay seen it again.. this time it was only 2 times instead of 20 times.. so its getting better..
rsbot [2007-05-01 14:14:22] [BUDDY] [LOG] Mysticnyts logged [on] (LEADER)
rsbot [2007-05-01 14:14:23] [GROUP] [MSG] [Rising Sun (AoF)] Rsbot: Heaven
ly "Mysticnyts" Angel (Lvl 181 / 11 (Able) Adventurer Squad Commander) logged on
:: [link]Nytsangel's Alts[/link] :: You hit Heckler of Harmony for 8335 point
s of Backstab damage.
rsbot [2007-05-01 14:14:34] [TELL] [OUT] -> Mysticnyts: 16 members online
in Guild. 0 members in Privategroup. :: [link]click to view[/link]
rsbot [2007-05-01 14:14:34] [TELL] [OUT] -> Mysticnyts: /tell rsbot !help
rsbot [2007-05-01 14:14:34] [TELL] [OUT] -> Mysticnyts: 16 members online
in Guild. 0 members in Privategroup. :: [link]click to view[/link]
rsbot [2007-05-01 14:14:34] [TELL] [OUT] -> Mysticnyts: /tell rsbot !help
-
Okay that seems to of fixed it.. People still get the !online at logon.. but they are not getting spammed..
-
The online spam is created by modules/LogonNotify_GUILD.php.
What did you modify to remove the spamming? Something in the SVN files or something in a custom file?
-
the only thing i did was renamed modules/LogonNotify_GUILD.php to modules/_LogonNotify_GUILD.php which stopped the spamming, but i am still getting the online list at logon..i have everything orgional.. but i do run 4 org bots with a shared !online database.. not sure if that has anything to do with it..
-
The only module spamming online should be LogonNotify_GUILD.php...
Will check when I find time.
And no, shared online DB shouldn't matter much, running it here too and I get no online spam.
-
k.. I will look through and see if I have any custom files still in place.. when I first started having problems I backed everything up and deleted everything except the conf folder.. or I thought.. I will double check to make sure..
-
I have looked and I do not see any reason why anything should be sent in a tell to anyone in what I have.. I have looked through every file that has anything with "connect" in it and nothing is sending a tell when people log on except for the file I renamed.. IDK.. I did look through the php error log and just from yesterday I have some errrors that may or may not help out..
[01-May-2007 07:57:31] PHP Warning: array_keys(): The first argument should be an array in C:\aobots\RS\rsbot\modules\MassMsg.php on line 118
[01-May-2007 08:00:12] PHP Warning: array_keys(): The first argument should be an array in C:\aobots\RS\rsbot\modules\MassMsg.php on line 118
[01-May-2007 08:25:11] PHP Warning: Invalid argument supplied for foreach() in C:\aobots\RS\rsbot\modules\IRC.php on line 698
[01-May-2007 08:25:11] PHP Warning: ksort() expects parameter 1 to be array, null given in C:\aobots\RS\rsbot\modules\IRC.php on line 700
[01-May-2007 08:25:11] PHP Warning: Invalid argument supplied for foreach() in C:\aobots\RS\rsbot\modules\IRC.php on line 702
[01-May-2007 15:32:57] PHP Warning: Invalid argument supplied for foreach() in C:\aobots\RS\rsbot\modules\IRC.php on line 698
[01-May-2007 15:32:57] PHP Warning: ksort() expects parameter 1 to be array, null given in C:\aobots\RS\rsbot\modules\IRC.php on line 700
[01-May-2007 15:32:57] PHP Warning: Invalid argument supplied for foreach() in C:\aobots\RS\rsbot\modules\IRC.php on line 702
I am just throwing everything in here maybe something will catch your eye.. I would like to get back to my custom IRC file but untill we get this figured out I am sticking with the default ones.. I will attach a text file with a list of all files I have and where.. maybe something I missed.. ..
okay here is a txt file with my bot directory ..
http://metanyt.homeip.net:8888/bebot/version_3/rsbot-dir.txt (http://metanyt.homeip.net:8888/bebot/version_3/rsbot-dir.txt)
-
You got two online files running, core/OnlineDB.php with module/OnlineDisplay.php for the table based version, and core/Online.php for the outdated array based version no longer in SVN.
About those errors - neither MassMsg.php nor IRC were adapted to the new online table, both were still trying to use the old arrays. As that array no longer exists you got those warnings.
I've edited both files to use the tables I think, at least the code compiles. As I'm not using IRC at all nor mass messeges I couldn't test it.
-
You got two online files running, core/OnlineDB.php with module/OnlineDisplay.php for the table based version, and core/Online.php for the outdated array based version no longer in SVN.
awesome.. had a feeling I missed something.. that took care of showing the online during log on..I also renamed the LogonNotify_GUILD.php and going to test to see if it still spams.. now that the core/online.php is gone..
okay with logonnotify_guild.php back in I get the !online 2x's...
[Rsbot]: 20 members online in Guild. 0 members in Privategroup. :: click to view
[Rsbot]: /tell rsbot !help
[Rsbot]: 20 members online in Guild. 0 members in Privategroup. :: click to view
[Rsbot]: /tell rsbot !help
I think this problem is somewhere else.. not in the logonnotify_guild.php.. I was having a problem in another thing I was trying to make which I have stoped because I couldnt get past the double postings of things.. I am woundering if something in bot.php isnt right...
http://bebot.link/index.php/topic,752.0.html (http://bebot.link/index.php/topic,752.0.html)
that was why I was trying to sent to org chat with out the bot processing them.. this could be the same problem..
-
About those errors - neither MassMsg.php nor IRC were adapted to the new online table, both were still trying to use the old arrays. As that array no longer exists you got those warnings.
I've edited both files to use the tables I think, at least the code compiles. As I'm not using IRC at all nor mass messeges I couldn't test it.
They work.. ty.. now if you could put in there a setting for RAW mode or normal mode.. where sending to IRC with out any conversions of items and everything else.... and also something like what I did here...
$maxcharsallowed = 457;
$maxcharsexceeded = ("Your message contained " . strlen($msg) . " Characters. Max characters allowed: " . $maxcharsallowed);
if (strlen($msg) <= $maxcharsallowed) //checks to see if the max allowed IRC message has been reached and if so sends a msg back to guild chat saying so
that would stop long scripts and stuff like that from being messed up and being sent over to IRC.. but this should probably be somewhere else.. I can let ya see my custom IRC file if you would like.. it has all that in it.. and you could adapt it to the IRC in an offical way..:)
-
I can try to add an option to disabled itemref parsing, but no clue if I can add that limiting stuff in there, as my experience in programming for IRC is almost non-existent ;)
-
sounds good.. I sent ya a message with my custom IRC file.. you will see it in there.. They are in the gmsg and the privgroup functions.. isnt all that hard.. but with out it if the msg is longer then what IRC will natively accept.. it cuts it off and makes a very bad list of every command used in the script to the max characters allowed by IRC and ends it .. it don't look pretty .. so the only way I could think of doing it was to just stop the really long ones from even being transmitted.
I can give ya access to our org bot if you would like for testing and what not.. if that would help out..also another thing I was thinking is having a verible for IRC color.. and IRC name that is transmitting..
link in the following in function irc_recieve(&$irc, &$data)
if ($this -> chat <= 1)
$this -> bot -> send_gc($this -> guildprefix . " <font color=#808000>" . $data -> nick . "</font>: " . $msg);
if ($this -> chat >= 1)
$this -> bot -> send_pgroup($this -> guildprefix . " <font color=#808000>" . $data -> nick . "</font>: " . $msg);
have a IRC name in one color varible and the msg in another color varible all done read from the database and changeable without restarting the bot.
-
Added your wishes to SVN version.
-
Added your wishes to SVN version.
awesome so far so good..one problem is ..
with formating off
<a href="itemref://218744/218745/198">Spiri-Aid Spindle</a>
that is what is shown in org chat.. it isnt making a link..
with formating on..
Spiri-Aid Spindle (http://aomainframe.net/showitem.asp?LowID=218744&HiID=218745&QL=198)
so it is working.. kind of.. just not allowing the bot to have it as a link..
in the irc_recieve I had to change the the following two lines to get it to work correctly..
$msg = str_replace("<", "<", $data -> message);
$msg = str_replace(">", ">", $msg);
and in the gmsg and privgroup I had to
$msg = str_replace(">", ">", $msg);
$msg = str_replace("<", "<", $msg);
and also the
StripFormatting: Off is actually on.. and the on is actually off..
on does the anuo and aomainframe and off does the item links
and yes I understand the str_replace but I left it in there for illustration.
and good job on the colors.. that was exactly what I wanted.. very nice..
oh one other thing.. if "online" is anywhere in the msg then the IRC file will spit out from every org who is online.. spaming all connected org channels..
-
Since there's some development going on on the IRC plugin I feel obligated to hint at http://bebot.link/index.php/topic,707.0.html :P
-
What did I do...
But good point, before I go and make some self-defined formatting we should better try to adapt the format you posted there, as it allows quite a bit more versality on all ends.
-
and also the
StripFormatting: Off is actually on.. and the on is actually off..
on does the anuo and aomainframe and off does the item links
Uhm it's working as I intended... StripFormatting = TRUE means formatting is stripped. StripFormatting = FALSE means it's put as it is on IRC.
oh one other thing.. if "online" is anywhere in the msg then the IRC file will spit out from every org who is online.. spaming all connected org channels..
No clue what's causing that... didn't modify anything past the formatting.
-
Since there's some development going on on the IRC plugin I feel obligated to hint at http://bebot.link/index.php/topic,707.0.html :P
yea this topic has kind of lead from one thing to another.. way of life I suppose.. :) I totally forgot about that one where I posted what I had.. but so far alreadythere has for the most part already put in almost everything.. just need to work out the little things now. other then that it looks good
oh one other thing.. if "online" is anywhere in the msg then the IRC file will spit out from every org who is online.. spaming all connected org channels..
No clue what's causing that... didn't modify anything past the formatting.
yea it has always did that since we went to IRC.. but now with the !online being able to show more then 1 org.. its kind of redundant.. well I suppose not really.. but it will spit out by bot who is online if online is anywhere in the message
-
ummm the bots are back to spamming again.. it dont happen all the time.. and it is very random..
-
on all 4 bots I am having to run with LogonNotify_GUILD.php as _LogonNotify_GUILD.php since it is still spamming when people log on, sometimes it only sends the !online 2 times but most of the time it is sending it 20+ times.
-
Removed LogonNotify_GUILD.php from SVN, as I moved the functionability into the two related modules (News.php and OnlineDisplay.php). The spamming can be enabled via settings.
Should remove the spamming, and I considered LogonNotify_GUILD.php as a hack anyways.
-
Spamming still occuring with latest SVN.
Something is very weird, and i cant seem to find any obvious place it's broken either.
Seems totally random, poor guildie was just spammed with about 20 Online and 20 News tells.
-
This should now be fixed in latest SVN.
-
This should now be fixed in latest SVN.
Nice.. does this mean I can turn it back on now..:) almost scared to even umm ya.. try it :)
-
From all my testing so far, it works.
The reason it happened is still baffling though to put it mildly.
Basically, what was happening was that the Logon Notify cron() was called, which in turn calls the 3 modules that are hooked into it, Online, News and Autoinvite.
Now due to the Online taking some time to generate by default with display of access levels, before cron() could finish running, it was called again. The slower things went, the more times cron() could be called. And thats the puzzling part. We dont thread!!! Somehow, cron() kept getting called even though it was not done with it's current iteration which should be impossible unless 1) We are threaded (which we're not), or 2) There are recursive calls (which i cant find any evidence of)
So yeah, baffling.
-
Nice finding at least.
Now that you described that I remember a similar case, I'm running a 1min cronjob checking for changes to the buddy list, and on first starts with large buddy lists the cron jobs runs several times parallel too.
No clue how that can happen, as from all I know php is fully serialized. And recursion can't be an issue in those cron jobs, think we got none at all in the bot.