diff options
Diffstat (limited to 'scripts/privmsg.pl')
-rw-r--r-- | scripts/privmsg.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/privmsg.pl b/scripts/privmsg.pl index 999bd213..9fdcdcb1 100644 --- a/scripts/privmsg.pl +++ b/scripts/privmsg.pl @@ -1,12 +1,13 @@ # listen PRIVMSGs - send a notice to yourself when your nick is meantioned use Irssi; +use Irssi::Irc; sub event_privmsg { my ($data, $server, $nick, $address) = @_; my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; - return if (!Irssi::is_channel($target)); + return if (!$server->ischannel($target)); $mynick = $server->values()->{'nick'}; return if ($text !~ /\b$mynick\b/); |