Created
December 9, 2009 20:48
-
-
Save semifor/252798 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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