Parse NOTICE and added hook on_notice.

This commit is contained in:
Elijah Perrault committed 2011-01-29 17:18:28 -07:00
1 parent 344500bcd7
commit bbc3dfd966
2 files changed
+13

No files matched your search

+1
View File
@@ -3,6 +3,7 @@ Auto IRC Bot 3.0: Change Log
3.0 Indev
==================================================================
* Parse NOTICE and added hook on_notice.
* Added hooks on_uprivmsg and on_cprivmsg.
* Module names are now case sensitive.
* Added config option module for auto-loading a module.
+12
View File
@@ -25,6 +25,7 @@ our %RAWC = (
'477' => \&num477,
'JOIN' => \&cjoin,
'NICK' => \&nick,
'NOTICE' => \&notice,
'PRIVMSG' => \&privmsg,
'TOPIC' => \&topic,
);
@@ -36,6 +37,7 @@ our (%got_001, %botnick, %botchans, %csprefix, %chanusers);
API::Std::event_add("on_rcjoin");
API::Std::event_add("on_ucjoin");
API::Std::event_add("on_nick");
API::Std::event_add("on_notice");
API::Std::event_add("on_cprivmsg");
API::Std::event_add("on_uprivmsg");
API::Std::event_add("on_topic");
@@ -338,6 +340,16 @@ sub nick
return 1;
}
# Parse: NOTICE
sub notice
{
my ($svr, @ex) = @_;
API::Std::event_run("on_notice", ($svr, @ex));
return 1;
}
# Parse: PRIVMSG
sub privmsg
{