Skip to content

Instantly share code, notes, and snippets.

@vkolev
Created January 14, 2010 21:49
Show Gist options
  • Save vkolev/277542 to your computer and use it in GitHub Desktop.
Save vkolev/277542 to your computer and use it in GitHub Desktop.
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