Changed arguments for on_uprivmsg and on_cprivmsg.

This commit is contained in:
Elijah Perrault committed 2011-02-15 22:22:45 -07:00
1 parent c0aa9d981c
commit 60cdd488ba
2 files changed
+9 -2

No files matched your search

+2
View File
@@ -3,6 +3,8 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev 3.0 Indev
=============================================================================== ===============================================================================
* Changed on_cprivmsg arguments to: \%src, $channel, @msg
* Changed on_uprivmsg arguments to: \%src, @msg
* Bug fix: Commands getting Permission denied even with incorrect prefix. * Bug fix: Commands getting Permission denied even with incorrect prefix.
* Changed command callback arguments to: \%src, @args * Changed command callback arguments to: \%src, @args
* Bundle server with \%src in the on_rcjoin event. * Bundle server with \%src in the on_rcjoin event.
+7 -2
View File
@@ -577,7 +577,9 @@ sub privmsg
} }
# Trigger event on_uprivmsg. # Trigger event on_uprivmsg.
API::Std::event_run("on_uprivmsg", ($svr, @ex)); shift @ex; shift @ex; shift @ex;
$ex[0] = substr $ex[0], 1;
API::Std::event_run("on_uprivmsg", (\%data, @ex));
} }
else { else {
# It is coming to us in a channel message. # It is coming to us in a channel message.
@@ -618,7 +620,10 @@ sub privmsg
} }
# Trigger event on_cprivmsg. # Trigger event on_cprivmsg.
API::Std::event_run("on_cprivmsg", ($svr, @ex)); my $target = $ex[2]; delete $data{chan};
shift @ex; shift @ex; shift @ex;
$ex[0] = substr $ex[0], 1;
API::Std::event_run("on_cprivmsg", (\%data, $target, @ex));
} }
return 1; return 1;