Subject: | change_nick_login_cb does not get called on reconnect |
When I disconnect from a server and the reconnect, the change_nick_login_cb function does not
get fired on irc_433. It works the first time I connect, but not on any subsequent connect
attempts.
Here is a short script that shows the problem.
I have dug pretty deep into things and can't seem to figure out where it is being unregistered.
Subject: | ae_irc_nick_test.pl |
#!/usr/bin/perl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::IRC::Client;
my $recon;
my $c = AnyEvent->condvar;
my $con = new AnyEvent::IRC::Client;
$con->reg_cb(connect => sub {
print STDERR "connected\n";
print STDERR $con->handles("irc_433"), "\n";
});
$con->connect("irc.freenode.net", 6667, {nick => "leedo"});
my $timer = AnyEvent->timer(after => 2, cb => sub {
print STDERR "reconnecting\n";
$c->send
});
$c->wait;
$con->disconnect;
$c = AnyEvent->condvar;
$con->connect("irc.freenode.net", 6667, {nick => "leedo"});
$c->wait;
$con->disconnect;