Skip to content

Instantly share code, notes, and snippets.

@semifor
Created December 9, 2009 20:48
Show Gist options
  • Select an option

  • Save semifor/252798 to your computer and use it in GitHub Desktop.

Select an option

Save semifor/252798 to your computer and use it in GitHub Desktop.
event ircd_daemon_nick => sub {
my ($self, $sender, $nick) = @_[OBJECT, SENDER, ARG0];
$self->log->debug("[ircd_daemon_nick] $nick");
# if it's a nick change, we only get ARG0 and ARG1
return unless defined $_[ARG2];
return if $nick eq $self->irc_botname;
# Abuse! Calling the private implementation of ircd to force-join the connecting
# user to the twitter channel. ircd set's it's heap to $self: see ircd's perldoc.
$sender->get_heap()->_daemon_cmd_join($nick, $self->irc_channel);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment