All pastes #829538 Raw Edit

Unnamed

public text v1 · immutable
#829538 ·published 2007-12-23 06:56 UTC
rendered paste body
use Irssi;
use vars qw($VERSION %IRSSI);

$VERSION = "1.0";
%IRSSI = (
    author => 'PrincessLeia2',
    contact => 'lyz\@princessleia.com ',
    name => 'gimmie',
    description => 'a bot script, using ! followed by anything the script will say (as an action): gets nickname anything',
    license => 'GNU GPL v2 or later',
    url => 'http://www.princessleia.com/'
);

sub event_privmsg {
my ($server, $data, $nick, $mask, $target) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
     return if ( $text !~ /^djweezy/i );
        if ( $text =~ /^djweezy$/i ) {
        	$server->command ( "action $target hands $nick a steaming cup of coffee" );
	}

        else {
        	my ($gimmie) = $text =~ /!(.*)/;
        	$server->command ( "action $target Gets $nick $gimmie \0032<\%)");
	}
}
Irssi::signal_add('event privmsg', 'event_privmsg');