Permalink
Browse files

greetignore.pl: Always use lowercase nicks

  • Loading branch information...
1 parent 1f279cb commit 121f5239447a7454d527578e60952e8b964ec391 @incognico committed Jun 7, 2013
Showing with 6 additions and 6 deletions.
  1. +6 −6 scripts/greetignore.pl
View
@@ -23,7 +23,7 @@
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
-$VERSION = "1.0";
+$VERSION = "1.1";
%IRSSI = (
authors => "David O\'Rourke, Nico R. Wohlgemuth",
contact => "nico\@lifeisabug.com",
@@ -74,9 +74,9 @@ sub ignore_greet {
return 0;
}
# If the message matches a nick in our joins hash, don't show the greet message.
- if ($msg =~ /^\[(.+?)\] / && $joins{$tag}{$1} && $nick ne $1) {
+ if ($msg =~ /^\[(.+?)\] / && $joins{$tag}{lc($1)} && $nick ne $1) {
Irssi::signal_stop();
- Irssi::print "Ignored: <$nick> $msg" if $debug;
+ Irssi::print("Ignored: <$nick> $msg") if $debug;
return 0;
}
}
@@ -89,9 +89,9 @@ sub message_join {
if (process_tag($tag) == 0) {
return 0;
}
- $joins{$tag}{$nick}++;
- my $data = $tag.':'.$nick;
- Irssi::timeout_add_once(1000, 'purge_nick', $data);
+ $joins{$tag}{lc($nick)}++;
+ my $data = $tag.':'.lc($nick);
+ Irssi::timeout_add_once(2500, 'purge_nick', $data);
return 0;
}

0 comments on commit 121f523

Please sign in to comment.