Skip Menu |
 

This queue is for tickets about the POE-Component-IRC CPAN distribution.

Report information
The Basics
Id: 84984
Status: patched
Priority: 0/
Queue: POE-Component-IRC

People
Owner: Nobody in particular
Requestors: tincho [...] debian.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: poco-irc does not work well with OFTC
Date: Thu, 2 May 2013 03:45:50 +0100
To: bug-POE-Component-IRC [...] rt.cpan.org
From: Martín Ferrari <tincho [...] debian.org>
Download (untitled) / with headers
text/plain 658b
Hi, Sorry that I cannot provide a detailed bug report, as I don't really understand the nature of the problem. SInce a few versions ago, PoCo-IRC-NickServID changed the way it autenticates, and that seems to break oftc authentication in OFTC. It is very difficult to tell exactly what's going on, as I am using this in a bot, but I think it is related to the change in the hooks to which it responds. I see that the nick gets protected by nickserv (a ghost user is created), and my bot gets a guestXXXX nick. With the older version I was using (debian stable), it worked, although it seemed to depend on some of the nickserv settings -- Martín Ferrari
Download (untitled) / with headers
text/plain 220b
https://gist.github.com/hinrik/5548593 Works for me. Can you install App::Pocoirc, run the command specified in that gist (with your nick), and show me the output? Can you find out which version you were using earlier?
Subject: Re: [rt.cpan.org #84984] poco-irc does not work well with OFTC
Date: Thu, 9 May 2013 18:45:05 +0100
To: bug-POE-Component-IRC [...] rt.cpan.org
From: Martín Ferrari <tincho [...] debian.org>
Download (untitled) / with headers
text/plain 1.1k
Hi, On 9 May 2013 17:33, Hinrik Orn Sigurdsson via RT <bug-POE-Component-IRC@rt.cpan.org> wrote: Show quoted text
> https://gist.github.com/hinrik/5548593 > > Works for me. Can you install App::Pocoirc, run the command specified in that gist (with your nick), and show me the output?
I've tried this, and it gave me an insight. With pocoirc works, so I tried to see if this was a problem in our application (http://alioth.debian.org/projects/kgb) and produced a minimum config to show you the equivalent log. And then I saw that it worked too (with the new lib)! It seems that it is related to the number of channels it joins. When joining only one channel it works, but our bot is joining currently 32 channels in OFTC, plus two in Freenode. See the logs attached, in the -not-working example, the IDENTIFY command is sent too late. Might this be an issue related to throttling? I see it sends first the JOIN commands, so maybe the throttling already took hold, and that's why it does not identify in time.. Show quoted text
> Can you find out which version you were using earlier?
I am using 6.35, because if I upgrade the authenticaton does not work any more. -- Martín Ferrari
Download kgb-bot.log
application/octet-stream 29.3k

Message body not shown because it is not plain text.

Download kgb-bot-not-working.log
application/octet-stream 531.4k

Message body not shown because it is not plain text.

Download pocoirc.log
application/octet-stream 21.1k

Message body not shown because it is not plain text.

Download (untitled) / with headers
text/plain 752b
I think the problem here is that a few releases ago, I changed the NickServID and AutoJoin plugins to work better together. Namely, so that it would only join channels after you're identified (which is nice if you use a cloak) and after turning on the IDENTIFY-MSG on the server (if available). OFTC changes your nickname to Guest if it takes you too long to identify, and since later releases try to identify slightly later, and your script joins all channels as soon as possible (after irc_001), it was taking too long to join the channels before the server responded to your identification request. The solution be to just let the AutoJoin plugin join channels for you, so things will happen in the right order. I attached a patch which does that.
Subject: autojoin.patch
Download autojoin.patch
text/x-diff 1.2k
Index: script/kgb-bot =================================================================== --- script/kgb-bot (revision 876) +++ script/kgb-bot (working copy) @@ -87,6 +87,7 @@ Connsvc => "Connecter", NSsvc => "NickServID", NRsvc => "NickReclaim", + AJsvc => "AutoJoin", ); our %supported_protos = ( "0" => 1, @@ -951,6 +952,11 @@ $alias =~ s/^irc_//; my $opts = $KGB::config->{networks}{$alias}; + if ($opts->{channels}) { + $irc_object->plugin_add( $KGB::const{AJsvc}, + POE::Component::IRC::Plugin::AutoJoin->new(Channels => $opts->{channels}) ); + } + $irc_object->plugin_add( $KGB::const{NSsvc}, POE::Component::IRC::Plugin::NickServID->new( @@ -1043,9 +1049,6 @@ my $channels = $KGB::config->{networks}{$net}{channels}; if ($channels) { KGB->out("Joining @$channels...\n"); - - # In any irc_* events SENDER will be the PoCo-IRC session - $kernel->post( $sender => join => $_ ) for @$channels; } undef; } @@ -1430,6 +1433,7 @@ use POE; use POE::Component::Server::SOAP; use POE::Component::IRC::State; +use POE::Component::IRC::Plugin::AutoJoin; use POE::Component::IRC::Plugin::BotAddressed; use POE::Component::IRC::Plugin::Connector; use POE::Component::IRC::Plugin::NickReclaim;
Subject: Re: [rt.cpan.org #84984] poco-irc does not work well with OFTC
Date: Fri, 10 May 2013 16:05:35 +0100
To: bug-POE-Component-IRC [...] rt.cpan.org
From: Martín Ferrari <tincho [...] debian.org>
On 9 May 2013 19:36, Hinrik Orn Sigurdsson via RT <bug-POE-Component-IRC@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=84984 > > > I think the problem here is that a few releases ago, I changed the NickServID and AutoJoin plugins to work better together. Namely, so that it would only join channels after you're identified (which is nice if you use a cloak) and after turning on the IDENTIFY-MSG on the server (if available).
I've seen that, and imagined it might be the cause. Show quoted text
> OFTC changes your nickname to Guest if it takes you too long to identify, and since later releases try to identify slightly later, and your script joins all channels as soon as possible (after irc_001), it was taking too long to join the channels before the server responded to your identification request. > > The solution be to just let the AutoJoin plugin join channels for you, so things will happen in the right order. I attached a patch which does that.
You nailed it, this works like a charm! Thank you very much, sir! -- Martín Ferrari


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.