From 871d5d6a3f6d77bc4906f585c51f0e22c8e62483 Mon Sep 17 00:00:00 2001 From: William Heimbigner Date: Thu, 26 Jan 2012 07:02:57 +0000 Subject: disabled dnsbl check for using ops, avoid line breaks in the middle of a nick --- config-default/commands.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/config-default/commands.xml b/config-default/commands.xml index 87728a6..098c104 100644 --- a/config-default/commands.xml +++ b/config-default/commands.xml @@ -289,7 +289,7 @@ {nick}}->{dnsbl} == 0) { +# if ($::sn{lc $event->{nick}}->{dnsbl} == 0) { my $tgt = $event->{to}->[0]; $tgt = $1 if (defined($1)); my $msg = $1; @@ -298,9 +298,18 @@ $::ignored{$tgt} = $::RISKS{'opalert'}; $conn->schedule(30, sub { delete($::ignored{$tgt})}); my $hilite=ASM::Util->commaAndify(ASM::Util->getAlert($tgt, 'opalert', 'hilights')); - $conn->privmsg($_, "[\x02$tgt\x02] - $event->{nick} wants op attention ($msg) $hilite") foreach ASM::Util->getAlert($tgt, 'opalert', 'msgs'); + my $txtz = "[\x02$tgt\x02] - $event->{nick} wants op attention ($msg) $hilite"; + foreach my $tgt2 (ASM::Util->getAlert($tgt, 'opalert', 'msgs')) { #unfortunately wikipedia has way too many ops, and it breaks things + if (length($txtz) <= 380) { + $conn->privmsg($tgt2, $txtz); + } else { + my $splitpart = rindex($txtz, " ", 380); + $conn->privmsg($tgt2, substr($txtz, 0, $splitpart)); + $conn->privmsg($tgt2, substr($txtz, $splitpart)); + } + } } - } +# } ]]> -- cgit v1.2.3