summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/event.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/event.pl b/modules/event.pl
index bbc56e1..b1876cd 100644
--- a/modules/event.pl
+++ b/modules/event.pl
@@ -496,6 +496,12 @@ sub on_nick {
push ( @channels, $chan );
}
}
+
+ # unfortunately Net::IRC sucks at IRC so we have to implement this ourselves
+ if ($oldnick eq lc $conn->{_nick}) {
+ $conn->{_nick} = $event->{args}[0];
+ }
+
$::sn{$newnick} = $::sn{$oldnick} if ($oldnick ne $newnick);
$::db->logg( $event );
delete( $::sn{$oldnick}) if ($oldnick ne $newnick);