-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkimpet.pl
32 lines (26 loc) · 890 Bytes
/
kimpet.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
# kim pets someone any time they are sad #
use strict;
use warnings;
use Irssi;
use vars qw($VERSION %IRSSI);
$VERSION = "0.01";
%IRSSI = (
authors => "kimspindel",
contact => "kimspindel\@gmail.com",
name => "kimpet",
description => "kim pets someone any time they are sad",
license => "Poop License lolololo",
);
Irssi::settings_add_str($IRSSI{'name'}, "pet_channels", "#channel1|#channel2|#channel3");
sub pet {
my ($server, $msg, $nick, $address, $channel) = @_;
if(($channel =~ Irssi::settings_get_str("pet_channels")))
{
#if($msg =~ /(?<!\S)(([:=]-?[\(\[\\\/]))|([D\]\)\\\/]-?[:=]])(?!\S)/) ## still gotta check these
if($msg =~ /[:=]-?[\(\[\\\/]$/) # TODO: add D:
{
$server->command("msg $channel \x01ACTION pets $nick\x01");
}
}
}
Irssi::signal_add('message public', 'pet');