Last active
August 29, 2015 14:12
-
-
Save jonasbits/43806cc3bbf1a8b7ee64 to your computer and use it in GitHub Desktop.
irssi bytebot
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; | |
$VERSION = "1.19"; | |
%IRSSI = ( | |
authors => 'David Leadbeater, Timo Sirainen, Georg Lukas', | |
contact => '[email protected], [email protected], [email protected]', | |
name => 'bytepad', | |
description => 'Adds a usercount for a channel as a statusbar item', | |
license => 'GNU GPLv2 or later', | |
url => 'http://irssi.dgl.cx/', | |
changes => 'Only show halfops if server supports them', | |
); | |
sub event_privmsg { | |
my ($server, $data, $nick, $mask, $target) =@_; | |
my ($target, $text) = $data =~ /^(\S*)\s:(.*)/; | |
return if ( $text !~ /^!/i ); | |
if ( $text =~ /^!help$/i ) { | |
# debugprint(10,"[ADMIN] $nick requested HELP"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :Public channel commands:"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :\@find [searchpattern] : Searches my database for that file"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :!$server->{nick} [file] : Queues that file and it will be sent to you when its your turn"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :\@$server->{nick}-stats : Shows you your queuepositions"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :\@$server->{nick}-que : Shows you your queuepositions"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :\@$server->{nick}-remove : Clears all your queued files"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :\@$server->{nick}-remove 2 : Clear your queueposition 2"); | |
$server->command("/QUOTE PRIVMSG " . $nick . " :$IRSSI{name} v$VERSION $IRSSI{url}"); | |
} | |
else if ( $text =~ /^!byte$/i ) { | |
my ($gimmie) = $text =~ /^!byte(.*)/; | |
$server->command ( "action $target Letar efter pass som $nick kan byta mot $gimmie \0032<\%)"); | |
} | |
else { | |
my ($gimmie) = $text =~ /!(.*)/; | |
$server->command ( "action $target Gets $nick $gimmie \0032<\%)"); | |
} | |
} | |
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