Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug in modules/seen.pm: Always remove a nick before inserting

  • Loading branch information...
commit acd29c173626075aeb84330c8d81521a90d70115 1 parent 5539882
@incognico authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 modules/seen.pm
View
6 modules/seen.pm
@@ -76,6 +76,8 @@ sub on_join {
sub on_kick {
my ($self, $chan, $nick, $kicker, $msg) = @_;
+
+ removelcnick($nick);
$dbh->do('INSERT INTO seen (type,ts,lcnick,nick,chan,kicker,reason) VALUES (?,?,?,?,?,?,?)', undef, ('kick', time, lc($nick), $nick, $chan, $kicker, $msg ? $msg : 'n/a'));
}
@@ -94,6 +96,8 @@ sub on_ownquit {
sub on_part {
my ($self, $chan, $nick, $user, $host, undef, $msg) = @_;
+
+ removelcnick($nick);
$dbh->do('INSERT INTO seen (type,ts,lcnick,nick,user,host,chan,reason) VALUES (?,?,?,?,?,?,?,?)', undef, ('part', time, lc($nick), $nick, $user, $host, $chan, $msg ? $msg : 'n/a'));
}
@@ -158,6 +162,8 @@ sub on_privmsg {
sub on_quit {
my ($self, $nick, $user, $host, undef, $msg) = @_;
+ removelcnick($nick);
+
$dbh->do('INSERT INTO seen (type,ts,lcnick,nick,user,host,reason) VALUES (?,?,?,?,?,?,?)', undef, ('quit', time, lc($nick), $nick, $user, $host, $msg ? $msg : 'n/a'));
}
Please sign in to comment.
Something went wrong with that request. Please try again.