BeBot - An Anarchy Online and Age Of Conan chat automaton
Archive => Anarchy Online Archive => AO 0.6 support => Topic started by: Waqu on November 23, 2010, 07:57:41 pm
-
Wtb automatic !irc connect after loosing irc connection after whatever reason the irc desided to go offline, but the game chat still works.
-
Check out the irc reconnect setting which should do what you want :)
-
Reconnect: On
Description: Should the bot automatically reconnect to IRC?
Change to: [ On | Off ]
But the problem is, it doesnt reconnect.
-
I have the same issue, my bots are connected through IRC and there's only 1 of the 3 dimension that is automatically connected each time I restart the bots. Annoying since I have no admin on RK2...
Where is it handled? Maybe I can find a fix for that.
-
Just a note.
This only seems to work by re-connecting on a bot restart.
What it doesn't do is to reconnect to IRC if the chat server splits or you get some random timeout. that needs a manual !irc connect or a restart.
G
-
Yes bot reconnects after restarting the bot, but what i need is the auto-reconnect after random timeout. Can we get that somehow?
-
No one cares?
-
I've spent a lot of time trying to tackle down the cause of the issue.
I went from rewriting IRC.php to updating SmartIRC.php to the latest version to finally a simple modification.
It's been a brutal two days but I finally have the most straightforward solution I could come up with.
The issue stems from a lack of error checking in SmartIRC.php
The code in IRC.php actually works beautifully provided there are some changes to SmartIRC.php
There are two ways to fix auto reconnect.
You could update to the latest version of SmartIRC, provided you update about four lines of code (the socket_select timeout and the external dependencies).
This would also mean changing _rawreceive() in IRC.php to listenOnce() which essentially does the same thing.
What I suggest is to just modify the SmartIRC.php that's inside the Sources directory of the bot.
I've included a modified version as an attachment.
Inside the function _rawreceive() I added the following snippet of code.
if ($rawdata === false) {
// reading from the socket failed, the connection is broken
return false;
}
This should be added right above the line "$this->_checktimer();"
That line only appears once inside SmartIRC.php so that's a rather nice way of identifying where the code should go.
P.S.
I would not say that no one cares but I would imagine the amount of people that use IRC are few.
The ones who do use IRC either put up with the issue or don't seem to be driven to fix the issue themselves.
-
Thanks for the modified file, now just have to wait and see if it reconnects or not.
-
Seems to be working fine now.
-
thx for this