Last active
December 19, 2015 15:29
-
-
Save wiiaboo/5976420 to your computer and use it in GitHub Desktop.
botdownload.pl
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
| 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