Skip to content

Instantly share code, notes, and snippets.

@bigpresh
Created July 11, 2013 16:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bigpresh/5976818 to your computer and use it in GitHub Desktop.
Save bigpresh/5976818 to your computer and use it in GitHub Desktop.
Mibbit-user-welcoming code from sophie
package Bot::BasicBot::Pluggable::Module::WelcomeMibbit;
use strict;
use base 'Bot::BasicBot::Pluggable::Module';
sub help {
return <<HELPMSG
Customised welcome to Mibbit users.
Invites them to change their nick and ask for any help they need.
HELPMSG
}
sub chanjoin {
my ($self, $mess, $pri) = @_;
if ($mess->{who} =~ /^mib_/) {
$self->say(
channel => $mess->{channel},
body => "Welcome $mess->{who}! Feel free to use /nick yournickhere"
. " to select a nicer nick. If you need any help, ask away"
. " - there's usually someone around to help.");
}
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment