diff options
| -rw-r--r-- | config-default/commands.xml | 15 |
1 files 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 @@ </command> <command cmd="^\!ops ?(#\S+)? ?(.*)" nohush="nohush"> <![CDATA[ - if ($::sn{lc $event->{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)); + } + } } - } +# } ]]> </command> <command cmd="^;blacklist (.*)" flag="o"> |
