This commit is contained in:
Elijah Perrault committed 2011-02-11 17:03:59 -07:00
1 parent e45c5d5c52
commit 6434fffb51
1 file changed
+4 -4
+4 -4
View File
@@ -11,7 +11,7 @@ use API::IRC qw(privmsg);
sub _init
{
# Add a hook for when we join a channel.
hook_add("on_rcjoin", "HelloChan", \&m_HelloChan::hello) or return 0;
hook_add("on_ucjoin", "HelloChan", \&m_HelloChan::hello) or return 0;
return 1;
}
@@ -19,17 +19,17 @@ sub _init
sub _void
{
# Delete the hook.
hook_del("on_rcjoin", "HelloChan") or return 0;
hook_del("on_ucjoin", "HelloChan") or return 0;
return 1;
}
# Main subroutine.
sub hello
{
my (($svr, %src, $chan)) = @_;
my (($svr, $chan)) = @_;
# Send a PRIVMSG.
privmsg($svr, $chan, "Hello ".$src{nick});
privmsg($svr, $chan, "Hello channel! I am a bot!");
return 1;
}