diff --git a/doc/CHANGELOG b/doc/CHANGELOG index a858673..785bdd4 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log 3.0 Indev =============================================================================== + * Changed command callback arguments to: \%src, @args * Bundle server with \%src in the on_rcjoin event. * logchan is now joined automatically. * Changed on_notice arguments to: \%src, $target, @msg diff --git a/lib/Parser/IRC.pm b/lib/Parser/IRC.pm index 0f38113..7792541 100644 --- a/lib/Parser/IRC.pm +++ b/lib/Parser/IRC.pm @@ -534,7 +534,6 @@ sub privmsg push(@argv, $ex[$i]); } $data{svr} = $svr; - @{ $data{args} } = @argv; my ($cmd, $cprefix, $rprefix); # Check if it's to a channel or to us. @@ -554,7 +553,7 @@ sub privmsg # If this command requires a privilege... if (API::Std::has_priv(API::Std::match_user(%data), $API::Std::CMDS{$cmd}{priv})) { # Make sure they have it. - &{ $API::Std::CMDS{$cmd}{'sub'} }(%data); + &{ $API::Std::CMDS{$cmd}{'sub'} }(\%data, @argv); } else { # Else give them the boot. @@ -563,7 +562,7 @@ sub privmsg } else { # Else execute the command without any extra checks. - &{ $API::Std::CMDS{$cmd}{'sub'} }(%data); + &{ $API::Std::CMDS{$cmd}{'sub'} }(\%data, @argv); } } else { @@ -595,7 +594,7 @@ sub privmsg # If this command takes a privilege... if (API::Std::has_priv(API::Std::match_user(%data), $API::Std::CMDS{$cmd}{priv})) { # Make sure they have it. - &{ $API::Std::CMDS{$cmd}{'sub'} }(%data) if $rprefix eq $cprefix; + &{ $API::Std::CMDS{$cmd}{'sub'} }(\%data, @argv) if $rprefix eq $cprefix; } else { # Else give them the boot. @@ -604,7 +603,7 @@ sub privmsg } else { # Else continue executing without any extra checks. - &{ $API::Std::CMDS{$cmd}{'sub'} }(%data) if $rprefix eq $cprefix; + &{ $API::Std::CMDS{$cmd}{'sub'} }(\%data, @argv) if $rprefix eq $cprefix; } } else {