What a lengthy and intimidating script.

so I won't go deep into it because this basically has unless junk in it but first...

on @!*:TEXT:*:#: {
%swear.punish = $readini($keke,options,punish))
if ($ischan) { return }
if ($readini($keke,options,ops)) { op_c }
if ($readini($keke,options,vops)) { vo_c }
if ($readini($keke,swear,words)) && ($match_text($1-)) {
if (None isin %swear.punish) { return }
if (kick isin %swear.punish) {
if (ban isin %swear.punish) {
.raw kick $chan $nick $+(:,$readini($keke,options,message)) $+ $cr $+ mode $chan +b $mask($fulladdress,2)
.timerswearunban 1 $readini($keke,options,secs) mode $chan -b $mask($fulladdress,2)
}
else { .raw kick $chan $nick $+(:,$readini($keke,options,message)) }
}
}
}

What i've highlighted in red is an alias that's local that is called within the script that detects an exempt list of channel calculations.

>

Code:
alias -l ischan {
  var %i = $numtok($readini($keke,exempt,chan),44),%j
  while (%i > 0) {
    %j = $gettok($readini($keke,exempt,chan),%i,44)
    if (%j isin $chan) || ($2 == %j) { return $true }
    dec %i
  }
  return $false
}


This alias calls an ini file by another alias $keke which is usually because its a quote of $scriptdirpathfile Obviously the script is outdated or just simply wants to continue using the old method of quoting while $qt($cmd) could of simply be done.. as you can also see this script is abusing alias(es).

So if you did change On text to on open you run into factors A) the $ischan alias is completly useless. B) Simply regex matches can cut down the size of the script and the use of certain alias calls.

Either or, im not sure were you pick this script off from, It's good for on text event but in your case its useless without re-writting part of it.


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }