summaryrefslogtreecommitdiff
path: root/files
diff options
context:
space:
mode:
authorMicah Anderson <micah@riseup.net>2011-04-28 17:43:49 -0400
committerMicah Anderson <micah@riseup.net>2011-04-28 18:07:54 -0400
commit4827958dda15705ac1eeb5eacc7e694a92bb7a5d (patch)
tree33707817e90c16ee760fa013718a7a4e779cd1a7 /files
parent5bfc4bb9490b0001343ffe011aea978c36f3e1f3 (diff)
add configuration variable to irc bot to enable IRC notice type messages which can be turned on by the puppet variable $nagios_nsa_usenotices
Diffstat (limited to 'files')
-rw-r--r--files/irc_bot/riseup-nagios-server.pl6
1 files changed, 5 insertions, 1 deletions
diff --git a/files/irc_bot/riseup-nagios-server.pl b/files/irc_bot/riseup-nagios-server.pl
index 7880dde..b69ecab 100644
--- a/files/irc_bot/riseup-nagios-server.pl
+++ b/files/irc_bot/riseup-nagios-server.pl
@@ -101,7 +101,11 @@ sub socket_has_data {
my $self = shift;
$self->{socket}->recv(my $data, 1024);
- $self->{conn}->privmsg($CFG::Nsa{'channel'}, $data);
+ if ($CFG::Nsa{'usenotices'} {
+ $self->{conn}->notice($CFG::Nsa{'channel'}, $data);
+ } else {
+ $self->{conn}->privmsg($CFG::Nsa{'channel'}, $data);
+ }
}
sub irc_on_connect {