Raw hooks now take hook names and support multiple hooks. This changes rchook_add and rchook_del.

This commit is contained in:
Elijah Perrault committed 2011-03-04 19:14:18 -07:00
1 parent f4448302e2
commit d4ff35a5f9
4 files changed
+31 -17

No files matched your search

+9 -3
View File
@@ -78,10 +78,16 @@ sub ircparse
M::SASLAuth::handle_authenticate($svr, @ex);
}
}
# Check if it's handled by core.
elsif (defined $RAWC{$ex[1]}) {
&{ $RAWC{$ex[1]} }($svr, @ex);
}
else {
# otherwise, check %RAWC for ex[1].
if (defined $RAWC{$ex[1]}) {
&{ $RAWC{$ex[1]} }($svr, @ex);
# otherwise, check for a raw hook.
if (defined $API::Std::RAWHOOKS{$ex[1]}) {
foreach (keys %{$API::Std::RAWHOOKS{$ex[1]}}) {
&{ $API::Std::RAWHOOKS{$ex[1]}{$_} }($svr, @ex);
}
}
}
}