From 4827958dda15705ac1eeb5eacc7e694a92bb7a5d Mon Sep 17 00:00:00 2001 From: Micah Anderson Date: Thu, 28 Apr 2011 17:43:49 -0400 Subject: add configuration variable to irc bot to enable IRC notice type messages which can be turned on by the puppet variable $nagios_nsa_usenotices --- files/irc_bot/riseup-nagios-server.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'files') 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 { -- cgit v1.2.3