[Opensim-dev] New developer with an idea to fix IRCBridgeBot
Justin Clark-Casey
jjustincc at googlemail.com
Fri Jan 17 01:05:53 UTC 2014
Hi Tamara. I've never looked at the IRC module before (and I'm not familiar with the IRC protocol), but could it be as
simple as calling m_reader.Read() in IRCConnector.Connect() and checking for the 004 and 005 responses?
Naturally, you would also need to set ReadTimeout [1] so that an unresponsive IRC server doesn't hang up the method
permanently.
I agree, a Sleep would be an ugly hack and something we want to avoid.
I must admit, the IRC module gets very neglected as I doubt any core developer uses it, but very happy to accept patches
on it. Others who have worked on it in the past might also want to chime in.
[1] http://msdn.microsoft.com/en-us/library/bk6w7hs8%28v=vs.100%29.aspx
On 16/01/14 20:16, Nihlaeth wrote:
> Hey All,
> I've been meaning to delve into the opensim code for a while now, and
> I finally found a starting point.
>
> I think I have found the problem with the IRCBridgeBot module. It
> sends the NICK, USER and JOIN commands at the same time, which causes
> the JOIN to be ignored, because ircd's need some time to log you in.
>
> This in turn causes the '[IRC-Connector-0]: cannot connect AvaBot29 to
> 127.0.0.1:5757: Write failure' error, because it doesn't get join
> confirmation, at which bridgebot starts to reconnect, starting the
> reconnect spam cycle.
>
> It quite simple to solve, bridgebot should wait for the 004, or 005
> (even better) response before sending the join command.
>
> See this example of a telnet irc login (with input captured from
> ircbridgebot, but timed differently):
> :epona.nihlaeth.nl 001 AvaBot70 :Welcome to the AvaIrc Internet Relay
> Chat Network AvaBot70
> :epona.nihlaeth.nl 002 AvaBot70 :Your host is
> epona.nihlaeth.nl[epona.nihlaeth.nl/6665], running version
> charybdis-3.2.1
> :epona.nihlaeth.nl 003 AvaBot70 :This server was created Thu Jan 16
> 2014 at 17:38:10 CET
> :epona.nihlaeth.nl 004 AvaBot70 epona.nihlaeth.nl charybdis-3.2.1
> DQRSZagiloswz CFILPQbcefgijklmnopqrstvz bkloveqjfI
> :epona.nihlaeth.nl 005 AvaBot70 CHANTYPES=&# EXCEPTS INVEX
> CHANMODES=eIbq,k,flj,CFPcgimnpstz CHANLIMIT=&#:15 PREFIX=(ov)@+
> MAXLIST=bqeI:100 MODES=4 NETWORK=AvaIrc KNOCK STATUSMSG=@+ CALLERID=g
> :are supported by this server
>
> I'd really like to provide a fix for this myself, but I'm afraid I'm
> going to need a bit of help with it. Anyone here who wants to help me
> get started?
>
> I don't quite understand how the different parts of the module fit
> together and communicate. I've identified the spot where the login is
> done, but other than building in a sleep (which would be a very ugly
> hack), I'm a bit stuck.
>
> I'd really appreciate it!
>
> Kind regards,
> Tamara van Haarlem
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
--
Justin Clark-Casey (justincc)
OSVW Consulting
http://justincc.org
http://twitter.com/justincc
More information about the Opensim-dev
mailing list