When doing the initial run of mozbot, boxes with two network cards may be unable to connect to an IRC server. This is caused by Net::IRC trying to connect with the address of the internal interface when the correct address would be the external one. mozbot hangs for a while and then complains:2001-08-02 02:23:54 UTC (27334) Subject: Help! I can't talk to irc.openprojects.net:6667! 2001-08-02 02:23:54 UTC (27334) Hello Sir or Madam! I'm afraid I could not connect to the IRC server. I tried, and will try and try again (unless you kill me...) but it was fruitless. Could you kick the IRC server for me? Give it a right ol' booting. And hit the network connection while you are at it, would you please? Thanks.
Jake has provided me with a workable patch from justdave, which I have in turn changed a bit. There are two patches, actually: one to Net::IRC's Connection.pm, and the other to mozbot.pl itself. I guess the patch to Connection.pm could be distributed with mozbot since it's a common problem AFAICS. mozbot's patch might be considered intrusive, but what's the big deal with specifying an IP address :)
Created attachment 44334 [details] [diff] [review] patch to make Connection.pm use the localaddr for connecting
fwiw Net::IRC was deprecated in favor of a much more complicated module which i vowed never to use in mozbot. and then mozbot was rewritten for 2.0. other than that the patches look ok (Net::IRC is modifable under Perl's Artistic License - no known license problems :-). the only other question is what the checkin rules are for mozbot. I think we're going w/ module owner + strong perl hacker. but i'm not sure.
Since the patches are interconnected, I don't know what to do. I don't think we can require everyone who uses mozbot to patch their Net::IRC, for one some of them (including me in one case) haven't got write access to the relevant files. Is Net::IRC still being maintained at all?
you can install a local copy of Net::IRC it should override the non local copy, that's what i do on windows. as for maintenance i don't understand that stuff ask zach the resident cpan expert.
you SHOULD be able to install a local copy and add it to @INC, but many CPAN modules don't understand how to do this. The CPAN.pm README has more info on this topic. Zach Resident CPAN Guru firstname.lastname@example.org
Removing 'review' keyword since the comments from the last review haven't yet been addressed.
We should bother Net::FTP maintainers, if they exist, to apply the patch, and fix mozbot to ask for an IP address, I guess. I really have no idea for another solution.
I was just pointed at this bug by an email from Hixie... This is already fixed in Net::IRC as of version 0.71. If you require Net::IRC 0.71 as a minimum version you only need the mozbot half of this patch.
Oh, cool, I had no idea anything had changed. Ok, I'll investigate the mozbot part of the patch further.
Created attachment 69057 [details] [diff] [review] Patch version 2 An alternative approach (doesn't have a UI for changing the localAddr setting). What do people think?
Comment on attachment 69057 [details] [diff] [review] Patch version 2 looks fine to me r=kiko