diff options
Diffstat (limited to 'scripts/privmsg.pl')
-rw-r--r-- | scripts/privmsg.pl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/privmsg.pl b/scripts/privmsg.pl index 9fdcdcb1..c667220c 100644 --- a/scripts/privmsg.pl +++ b/scripts/privmsg.pl @@ -1,15 +1,14 @@ # 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 ($server, $data, $nick, $address) = @_; my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; return if (!$server->ischannel($target)); - $mynick = $server->values()->{'nick'}; + $mynick = $server->{nick}; return if ($text !~ /\b$mynick\b/); $server->command("/notice $mynick In channel $target, $nick!$address said: $text"); |