diff options
author | Mike Crute <mcrute@gmail.com> | 2014-08-28 12:53:25 -0700 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2014-08-28 12:53:25 -0700 |
commit | 5098b967ed5ed80fca7d8cfb39a1ce15dea85661 (patch) | |
tree | b2dbb1e0d184f912f9396a40216e37e29ed28f8b /.irssi | |
parent | 9662ad9c5e3227d2d6bfc6444b8059083101ebca (diff) | |
download | dotfiles-5098b967ed5ed80fca7d8cfb39a1ce15dea85661.tar.bz2 dotfiles-5098b967ed5ed80fca7d8cfb39a1ce15dea85661.tar.xz dotfiles-5098b967ed5ed80fca7d8cfb39a1ce15dea85661.zip |
Remove irssi modules
Diffstat (limited to '.irssi')
-rwxr-xr-x | .irssi/modules/libfe_xmpp.so | bin | 64896 -> 0 bytes | |||
-rwxr-xr-x | .irssi/modules/libtext_xmpp.so | bin | 14716 -> 0 bytes | |||
-rwxr-xr-x | .irssi/modules/libxmpp_core.so | bin | 132360 -> 0 bytes | |||
l--------- | .irssi/scripts/autorun/irssi-notify.pl | 1 | ||||
l--------- | .irssi/scripts/autorun/notifier.pl | 1 | ||||
-rw-r--r-- | .irssi/scripts/irssi-notify.pl | 41 | ||||
-rw-r--r-- | .irssi/scripts/notifier.pl | 142 |
7 files changed, 42 insertions, 143 deletions
diff --git a/.irssi/modules/libfe_xmpp.so b/.irssi/modules/libfe_xmpp.so deleted file mode 100755 index b88880d..0000000 --- a/.irssi/modules/libfe_xmpp.so +++ /dev/null | |||
Binary files differ | |||
diff --git a/.irssi/modules/libtext_xmpp.so b/.irssi/modules/libtext_xmpp.so deleted file mode 100755 index 78bcf42..0000000 --- a/.irssi/modules/libtext_xmpp.so +++ /dev/null | |||
Binary files differ | |||
diff --git a/.irssi/modules/libxmpp_core.so b/.irssi/modules/libxmpp_core.so deleted file mode 100755 index 870abcf..0000000 --- a/.irssi/modules/libxmpp_core.so +++ /dev/null | |||
Binary files differ | |||
diff --git a/.irssi/scripts/autorun/irssi-notify.pl b/.irssi/scripts/autorun/irssi-notify.pl new file mode 120000 index 0000000..accb805 --- /dev/null +++ b/.irssi/scripts/autorun/irssi-notify.pl | |||
@@ -0,0 +1 @@ | |||
../irssi-notify.pl \ No newline at end of file | |||
diff --git a/.irssi/scripts/autorun/notifier.pl b/.irssi/scripts/autorun/notifier.pl deleted file mode 120000 index 01117fe..0000000 --- a/.irssi/scripts/autorun/notifier.pl +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | ../notifier.pl \ No newline at end of file | ||
diff --git a/.irssi/scripts/irssi-notify.pl b/.irssi/scripts/irssi-notify.pl new file mode 100644 index 0000000..0731314 --- /dev/null +++ b/.irssi/scripts/irssi-notify.pl | |||
@@ -0,0 +1,41 @@ | |||
1 | use Irssi; | ||
2 | |||
3 | $::VERSION='0.0.1'; | ||
4 | %::IRSSI = ( | ||
5 | authors => 'Mike Crute', | ||
6 | contact => 'gmail.com!mcrute', | ||
7 | name => 'irssi-notify', | ||
8 | description => 'Displays a pop-up message for message received', | ||
9 | url => 'http://mike.crute.me/', | ||
10 | license => 'GNU General Public License', | ||
11 | changed => '$Date$' | ||
12 | ); | ||
13 | |||
14 | sub notify_send { | ||
15 | my ($title,$message) = @_; | ||
16 | @args = ('-i', '/usr/share/icons/hicolor/32x32/apps/empathy.png', $title, $message); | ||
17 | system('notify-send', @args); | ||
18 | } | ||
19 | |||
20 | sub notify_send_mac { | ||
21 | my ($title,$message) = @_; | ||
22 | @args = ('-message', $message, '-title', $title); | ||
23 | system('terminal-notifier', @args); | ||
24 | } | ||
25 | |||
26 | sub pub_msg { | ||
27 | my ($server,$msg,$nick,$address,$target) = @_; | ||
28 | |||
29 | if ($msg =~ Irssi::settings_get_str('notify_nick')) { | ||
30 | notify_send("Public Message in $target", "$nick: $msg"); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | sub priv_msg { | ||
35 | my ($server,$msg,$nick,$address) = @_; | ||
36 | notify_send("Private Message", "$nick: $msg"); | ||
37 | } | ||
38 | |||
39 | Irssi::settings_add_str('misc', 'notify_nick', 0); | ||
40 | Irssi::signal_add_last('message public', \&pub_msg); | ||
41 | Irssi::signal_add_last('message private', \&priv_msg); | ||
diff --git a/.irssi/scripts/notifier.pl b/.irssi/scripts/notifier.pl deleted file mode 100644 index a242545..0000000 --- a/.irssi/scripts/notifier.pl +++ /dev/null | |||
@@ -1,142 +0,0 @@ | |||
1 | # == WHAT | ||
2 | # Simple script for irssi to trigger Mac OS X 10.8's Notification Center | ||
3 | # | ||
4 | # == WHO | ||
5 | # Patrick Kontschak 2012 | ||
6 | # | ||
7 | # Forked from Nate Murray's irssi-growl: https://github.com/jashmenn/irssi-growl | ||
8 | # | ||
9 | # == CONFIG | ||
10 | # /SET notifier_on_regex [regex] | ||
11 | # /SET notifier_channel_regex [regex] | ||
12 | # | ||
13 | # == EXAMPLES | ||
14 | # | ||
15 | # notifier on mynickname | ||
16 | # /SET notifier_on_regex mynickname | ||
17 | # | ||
18 | # notifier on everything: | ||
19 | # /SET notifier_on_regex .* | ||
20 | # | ||
21 | # everything but jdewey | ||
22 | # /SET notifier_on_regex (?=^(?:(?!jdewey).)*$).* | ||
23 | # | ||
24 | # only notifier things for mychannel1 and mychannel2 | ||
25 | # /SET notifier_channel_regex (mychannel1|mychannel2) | ||
26 | # | ||
27 | # == INSTALL | ||
28 | # Place notifier.pl in `~/.irssi/scripts/`. | ||
29 | # /script load notifier.pl | ||
30 | # | ||
31 | |||
32 | use strict; | ||
33 | use Irssi; | ||
34 | use vars qw($VERSION %IRSSI); | ||
35 | # use Config; | ||
36 | |||
37 | # Dev. info ^_^ | ||
38 | $VERSION = "0.0"; | ||
39 | %IRSSI = ( | ||
40 | authors => "Patrick Kontschak", | ||
41 | contact => "patrick.kontschak\@gmail.com", | ||
42 | name => "Notifier", | ||
43 | description => "Simple script that will trigger Mac OS X 10.8's Notification Center", | ||
44 | license => "GPL", | ||
45 | url => "http://www.codinggoat.com", | ||
46 | changed => "Wed 8 Aug 2012 14:40:15 EDT" | ||
47 | ); | ||
48 | |||
49 | # All the works | ||
50 | sub do_notifier { | ||
51 | my ($server, $title, $data) = @_; | ||
52 | $data =~ s/["';]//g; | ||
53 | system("terminal-notifier -message '$data' -title '$title' >> /dev/null 2>&1"); | ||
54 | return 1 | ||
55 | } | ||
56 | |||
57 | sub notifier_it { | ||
58 | my ($server, $title, $data, $channel, $nick) = @_; | ||
59 | |||
60 | my $filter = Irssi::settings_get_str('notifier_on_regex'); | ||
61 | my $channel_filter = Irssi::settings_get_str('notifier_channel_regex'); | ||
62 | my $notifier_on_nick = Irssi::settings_get_str('notifier_on_nick'); | ||
63 | |||
64 | my $current_nick = $server->{nick}; | ||
65 | if($filter) { | ||
66 | return 0 if $data !~ /$filter/; | ||
67 | } | ||
68 | if($channel_filter && $server->ischannel($channel)) { | ||
69 | return 0 if $channel !~ /$channel_filter/; | ||
70 | } | ||
71 | |||
72 | $title = $title . " " . $channel; | ||
73 | do_notifier($server, $title, $data); | ||
74 | } | ||
75 | |||
76 | # All the works | ||
77 | sub notifier_message { | ||
78 | my ($server, $data, $nick, $mask, $target) = @_; | ||
79 | notifier_it($server, $nick, $data, $target, $nick); | ||
80 | Irssi::signal_continue($server, $data, $nick, $mask, $target); | ||
81 | } | ||
82 | |||
83 | sub notifier_join { | ||
84 | my ($server, $channel, $nick, $address) = @_; | ||
85 | notifier_it($server, "Join", "$nick has joined", $channel, $nick); | ||
86 | Irssi::signal_continue($server, $channel, $nick, $address); | ||
87 | } | ||
88 | |||
89 | sub notifier_part { | ||
90 | my ($server, $channel, $nick, $address) = @_; | ||
91 | notifier_it($server, "Part", "$nick has parted", $channel, $nick); | ||
92 | Irssi::signal_continue($server, $channel, $nick, $address); | ||
93 | } | ||
94 | |||
95 | sub notifier_quit { | ||
96 | my ($server, $nick, $address, $reason) = @_; | ||
97 | notifier_it($server, "Quit", "$nick has quit: $reason", $server, $nick); | ||
98 | Irssi::signal_continue($server, $nick, $address, $reason); | ||
99 | } | ||
100 | |||
101 | sub notifier_invite { | ||
102 | my ($server, $channel, $nick, $address) = @_; | ||
103 | notifier_it($server, "Invite", "$nick has invited you on $channel", $channel, $nick); | ||
104 | Irssi::signal_continue($server, $channel, $address); | ||
105 | } | ||
106 | |||
107 | sub notifier_topic { | ||
108 | my ($server, $channel, $topic, $nick, $address) = @_; | ||
109 | notifier_it($server, "Topic: $topic", "$nick has changed the topic to $topic on $channel", $channel, $nick); | ||
110 | Irssi::signal_continue($server, $channel, $topic, $nick, $address); | ||
111 | } | ||
112 | |||
113 | sub notifier_privmsg { | ||
114 | # $server = server record where the message came | ||
115 | # $data = the raw data received from server, with PRIVMSGs it is: | ||
116 | # "target :text" where target is either your nick or #channel | ||
117 | # $nick = the nick who sent the message | ||
118 | # $host = host of the nick who sent the message | ||
119 | my ($server, $data, $nick, $host) = @_; | ||
120 | my ($target, $text) = split(/ :/, $data, 2); | ||
121 | # only notify if we're permitting notification on privmsg | ||
122 | if (Irssi::settings_get_str('notifier_on_privmsg') == 1) { | ||
123 | notifier_it($server, $nick, $data, $target, $nick); | ||
124 | } | ||
125 | Irssi::signal_continue($server, $data, $nick, $host); | ||
126 | } | ||
127 | |||
128 | # Hook me up | ||
129 | Irssi::settings_add_str('misc', 'notifier_on_regex', 0); # false | ||
130 | Irssi::settings_add_str('misc', 'notifier_channel_regex', 0); # false | ||
131 | Irssi::settings_add_str('misc', 'notifier_on_nick', 1); # true | ||
132 | Irssi::settings_add_str('misc', 'notifier_on_privmsg', 0); # false | ||
133 | Irssi::signal_add('message public', 'notifier_message'); | ||
134 | Irssi::signal_add('message private', 'notifier_message'); | ||
135 | Irssi::signal_add('message own_public', 'notifier_message'); | ||
136 | Irssi::signal_add('message own_private', 'notifier_message'); | ||
137 | Irssi::signal_add('message join', 'notifier_join'); | ||
138 | Irssi::signal_add('message part', 'notifier_part'); | ||
139 | Irssi::signal_add('message quit', 'notifier_quit'); | ||
140 | Irssi::signal_add('message invite', 'notifier_invite'); | ||
141 | Irssi::signal_add('message topic', 'notifier_topic'); | ||
142 | Irssi::signal_add('event privmsg', 'notifier_privmsg'); | ||