-
Notifications
You must be signed in to change notification settings - Fork 1
/
fruitkick.pl
61 lines (55 loc) · 991 Bytes
/
fruitkick.pl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
use strict;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "1.01";
%IRSSI = (
authors => "mr_flea",
contact => "mrflea\@gmail.com",
name => "fruitkick.pl",
description => "Uses a random fruit name as kick message.",
license => "BSD",
url => "http://www.phantomflame.com/",
changed => "Thu 21 Jul 2011 04:48:36 PM UTC",
);
my @fruits = (
'papaya',
'banana',
'apple',
'tomato',
'cranberry',
'blueberry',
'raspberry',
'gooseberry',
'watermelon',
'boysenberry',
'blackberry',
'strawberry',
'cherry',
'orange',
'lemon',
'lime',
'grape',
'kiwi',
'pomegranate',
'guava',
'grapefruit',
'pineapple',
'fig',
'plum',
'nectarine',
'mango',
'cantaloupe',
'honeydew',
'durian',
'lychee',
'pear',
'apricot',
'tangerine',
'clementine',
);
sub cmd_fruitkick {
my ($data, $server, $witem) = @_;
my $kickee = (split(/ /, $data, 2))[0];
$witem->command("KICK $kickee " . $fruits[rand $#fruits]);
}
Irssi::command_bind('fruitkick', 'cmd_fruitkick');