Skip to content

Instantly share code, notes, and snippets.

@wiiaboo
Last active December 19, 2015 15:29
Show Gist options
  • Select an option

  • Save wiiaboo/5976420 to your computer and use it in GitHub Desktop.

Select an option

Save wiiaboo/5976420 to your computer and use it in GitHub Desktop.
botdownload.pl
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.0";
%IRSSI = (
authors => 'RiCON',
contact => 'pararecebermerda\@gmail.com',
name => 'bot downloader',
description => 'a bot script, using ! followed by anything the script will say (as an action): gets nickname anything',
license => 'MIT',
url => 'http://fansubban.org/'
);
sub event_privmsg {
my ($server, $data, $nick, $target) =@_;
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/;
return if ( $text !~ /^!saca-me/i );
return if ( $nick !~ /^(Venn|RiCON|Venancio)$/i );
if ( $text =~ /^!saca-me pack (\d+) do (\S+) no (\w+)/i ) {
$server->command ( "msg -$3 $2 xdcc send $1" );
}
elsif ($text =~ /^!saca-me pack (\d+) do (\S+)/i ) {
$server->command ( "msg -Rizon $2 xdcc send $1" );
}
else {
$server->command ( "msg $target o comando é !saca-me pack 123 do nickdobot [no ServidorX]");
}
}
Irssi::signal_add('event privmsg', 'event_privmsg');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment