Created
January 14, 2010 21:49
-
-
Save vkolev/277542 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub on_join { | |
# get our connection object and the event object, which is passed | |
# with this event automatically | |
my ($conn, $event) = @_; | |
# this is the nick that just joined | |
my $nick = $event->{nick}; | |
# say hello to the nick in public | |
$conn->privmsg($conn->{channel}, "Hello, $nick!"); | |
} | |
$conn->add_handler('join', \&on_join); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment