aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hipchat-stfu.pl35
1 files changed, 26 insertions, 9 deletions
diff --git a/hipchat-stfu.pl b/hipchat-stfu.pl
index 1145891..41abb7f 100644
--- a/hipchat-stfu.pl
+++ b/hipchat-stfu.pl
@@ -16,15 +16,32 @@ $VERSION = '1.00';
sub hipchat_stfu {
my ($server, $text, $nick) = @_;
- my $filename = 'hipchat-stfu-output.txt';
- open(my $fh, '>>', $filename) or die;
- print $fh Dumper($server);
- print $fh "\t";
- print $fh $text;
- print $fh "\t";
- print $fh $nick;
- print $fh "\n";
- close $fh;
+ # my $filename = 'hipchat-stfu-output.txt';
+ # open(my $fh, '>>', $filename) or die;
+ # print $fh Dumper($server);
+ # print $fh "\t";
+ # print $fh $text;
+ # print $fh "\t";
+ # print $fh $nick;
+ # print $fh "\n";
+ # close $fh;
+
+ if ($server->{'chatnet'} eq 'Bitlbee' &&
+ $nick eq 'root') {
+ open(my $fh, '>>', 'hipchatyeehaw.txt') or die;
+ # print $fh 'yeehaw' if ($text eq '');
+ # print $fh 'boohoo' if (!defined($text));
+ print $fh 'booya' if ($text =~ /^\s*$/);
+ # print $fh $text . "\n";
+ close $fh;
+
+ if ($text eq '') {
+ signal_stop();
+ }
+ else {
+ # Modify the text
+ }
+ }
};
signal_add {