diff options
| author | Teddy Wing | 2015-06-14 18:45:07 -0400 |
|---|---|---|
| committer | Teddy Wing | 2015-06-14 18:45:07 -0400 |
| commit | d8ec1e64766e3976c21a282cd442442e4daf3533 (patch) | |
| tree | 49ddc6fa75f9371e54d6cbe89e29a123ef3c5c96 | |
| parent | f2049b7251a12eb44b1788382900afa10de76b78 (diff) | |
| download | irssi-hipchat-stfu-d8ec1e64766e3976c21a282cd442442e4daf3533.tar.bz2 | |
Transform messages from HipChat & output to channel
Use the `signal_continue` sub to continue sending the message with
transformed text.
Thanks so much to `Nei` on Freenode#irssi for recommending
`signal_continue`!
Decided to get all variables from the caller to be able to pass them on
to `signal_continue`.
| -rw-r--r-- | hipchat-stfu.pl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl index 95bd0d4..30b15c2 100644 --- a/hipchat-stfu.pl +++ b/hipchat-stfu.pl @@ -1,7 +1,7 @@ use strict; use vars qw($VERSION %IRSSI); -use Irssi qw(signal_add signal_stop); +use Irssi qw(signal_add signal_stop signal_continue); $VERSION = '1.00'; %IRSSI = ( @@ -36,7 +36,7 @@ sub prettify_hipchat { }; sub hipchat_stfu { - my ($server, $text, $nick) = @_; + my ($server, $text, $nick, $address, $target) = @_; if ($server->{'chatnet'} eq 'Bitlbee' && $nick eq 'root') { @@ -44,7 +44,7 @@ sub hipchat_stfu { signal_stop(); } else { - # Modify the text + signal_continue($server, prettify_hipchat($text), $nick, $address, $target); } } }; |
