aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2015-06-14 18:45:07 -0400
committerTeddy Wing2015-06-14 18:45:07 -0400
commitd8ec1e64766e3976c21a282cd442442e4daf3533 (patch)
tree49ddc6fa75f9371e54d6cbe89e29a123ef3c5c96
parentf2049b7251a12eb44b1788382900afa10de76b78 (diff)
downloadirssi-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.pl6
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);
}
}
};