on *:load:{ if (($hget(fignore) == $null) && ($isfile($scriptdir $+ fignore.hsh) != $false)) { hmake fignore 10 hload fignore $scriptdir $+ fignore.hsh } echo -ag Loaded FsayDetect by Corwin echo -ag Commands: echo -ag /fdetect -- Toggles Non-windowed Fsay Detection echo -ag /fdetect -w Toggles Windowed Fsay Detection echo -ag /fignore -- Ignores detection of a certain FSAY/ACTION Nickname echo -ag /fignore -u -- Ignores detection of FSAY/ACTIONs sent out by a user echo -ag /fignore -c <#channel [chan]> -- Ignores detection of FSAY/ACTIONs sent to a specific channel, \\\\\\\"chan\\\\\\\" is an optional argument that can be added to the command to only ignore in-channel detections, it will still be detected in the fsay window. echo -ag /fignore -r -- Unignores that FSAY/ACTION Nickname/Oper, putting no argument clears the list. echo -ag /fignore -l -- Lists the F-ignore list echo -ag /fcommands -- Brings up this list of commands. echo -ag Note: All detection is currently off. } on *:unload:{ .disable #fdetect if ($hget(fignore) != $null) { hfree fignore } unset %fdetect unset %fdetectwin } alias fdetect { if ($group(#fdetect) == off) { .enable #fdetect } if ($1 == -w) { if (%fdetectwin == $null) { set %fdetectwin on echo -ag Windowed FSAY detection enabled } else { unset %fdetectwin echo -ag Windowed FSAY detection disabled } } elseif (%fdetect == $null) { set %fdetect on echo -ag Non-windowed FSAY detection enabled } else { unset %fdetect echo -ag Non-windowed FSAY detection disabled } if ($isfile($scriptdir $+ fignore.hsh) != $false) { if ($hget(fignore) == $null) { hmake fignore 10 } hload fignore $scriptdir $+ fignore.hsh } if ((%fdetect == $null) && (%fdetectwin == $null)) { .disable #fdetect } } #fdetect on on *:connect:{ if ($isfile($scriptdir $+ fignore.hsh) != $false) { if ($hget(fignore) == $null) { hmake fignore 10 } hload fignore $scriptdir $+ fignore.hsh } } on ^*:text:*:#:{ if (RPG.irc == $site) { if (($hget(fignore,$nick) != ignore) && ($hget(fignore,$chan) != cignore all) && ($hget($remove($address,@RPG.irc)) != uignore)) { if ((%fdetect != $null) && ($hget(fignore,$chan) != cignore chan)) { echo -t $chan ( $+ $remove($address,@RPG.irc) $+ ) < $+ $nick $+ > $1- haltdef } if (%fdetectwin != $null) { if ((%fdetect == $null) && ($chan($chan).logfile != $null)) { haltdef write $chan($chan).logfile $logstamp ( $+ $remove($address,@RPG.irc) $+ ) < $+ $nick $+ > $1- echo -tg $chan < $+ $nick $+ > $1- } if ($window(@Fsay) == $null) { window -nk(0) @Fsay } if ($chr(31) !isin $nick) { if (>Ambiance< != $nick) { echo @Fsay $remove($address,@RPG.irc) FSAYed $nick on $chan $+ : $timestamp < $+ $nick $+ > $1- } else { echo @Fsay $remove($address,@RPG.irc) used AMBIANCE on $chan $+ : $timestamp < $+ $nick $+ > $1- } } else { echo @Fsay $remove($address,@RPG.irc) NPCed $nick on $chan $+ : $timestamp < $+ $nick $+ > $1- } } } } } on ^*:ACTION:*:#:{ if (RPG.irc == $site) { if (($hget(fignore,$nick) != ignore) && ($hget(fignore,$chan) != cignore all) && ($hget($remove($address,@RPG.irc)) != uignore)) { if ((%fdetect != $null) && ($hget(fignore,$chan) != cignore chan)) { echo -tc action $chan ( $+ $remove($address,@RPG.irc) $+ ) * $nick $1- haltdef } if (%fdetectwin != $null) { if ((%fdetect == $null) && ($chan($chan).logfile != $null)) { haltdef write $chan($chan).logfile $logstamp ( $+ $remove($address,@RPG.irc) $+ ) * $nick $1- echo -tgc action $chan * $nick $1- } if ($window(@Fsay) == $null) { window -nk(0) @Fsay } if ($chr(31) !isin $nick) { echo @Fsay $remove($address,@RPG.irc) FACTIONed $nick on $chan $+ : $timestamp * $nick $1- } else { echo @Fsay $remove($address,@RPG.irc) NPCAed $nick on $chan $+ : $timestamp * $nick $1- } } } } } #fdetect end alias fignore { if ($1 != $null) { if ($hget(fignore) == $null) { hmake fignore 10 } if (($1 != -r) && ($1 != -l) && ($1 != -u) && ($1 != -c)) { hadd fignore $$1 ignore echo -agc info * Added $$1 to F-ignore list hsave -o fignore $scriptdir $+ fignore.hsh } if ($1 == -u) { if ($2 != $null) { hadd fignore $2 uignore echo -agc info * Added user $2 to F-ignore list hsave -o fignore $scriptdir $+ fignore.hsh } else { echo -agc info * /fignore -u: insufficient parameters } } if ($1 == -c) { if ($2 != $null) { if ($3 == chan) { hadd fignore $2 cignore chan echo -agc info * Added $2 to F-ignore list (In channel detection only) hsave -o fignore $scriptdir $+ fignore.hsh } else { if ($hget(fignore,$3) != $null) { hdel fignore $3 } hadd fignore $2 cignore all echo -agc info * Added $2 to F-ignore list hsave -o fignore $scriptdir $+ fignore.hsh } } else { echo -agc info * /fignore -c: insufficient parameters } } if ($1 == -l) { if ($hget(fignore,0).item != 0) { var %inumber 1 echo -agc info * Fignore list: while (%inumber <= $hget(fignore,0).item) { if ($hget(fignore,%inumber).data == ignore) { echo -agc info FSAYed Nickname: $hget(fignore,%inumber).item } elseif ($hget(fignore,%inumber).data == uignore) { echo -agc info User: $hget(fignore,%inumber).item } else { if ($hget(fignore,%inumber).data != cignore chan) { echo -agc info Channel: $hget(fignore,%inumber).item } else { echo -agc info Channel: $hget(fignore,%inumber).item (In channel detection only) } } inc %inumber 1 } } else { echo -agc info * F-ignore list empty } } if ($1 == -r) { if ($2 == $null) { if ($file($scriptdir $+ fignore.hsh) != $null) { hfree fignore .remove $scriptdir $+ fignore.hsh echo -agc info * F-ignore list cleared } else { echo -agc info * F-ignore list empty } } if ($2 != $null) { if ($hget(fignore,$2) != $null) { hdel fignore $2 echo -agc info * Removed $2 from the F-ignore list if ($hget(fignore,0).item != 0) { hsave -o fignore $scriptdir $+ fignore.hsh } else { hfree fignore .remove $scriptdir $+ fignore.hsh } } else { echo -agc info * $2 is not in F-ignore list } } } } else { echo -agc info * /fignore: insufficient parameters } } alias fcommands { echo -ag Commands: echo -ag /fdetect -- Toggles Non-windowed Fsay Detection echo -ag /fdetect -w Toggles Windowed Fsay Detection echo -ag /fignore -- Ignores detection of a certain FSAY/ACTION Nickname echo -ag /fignore -u -- Ignores detection of FSAY/ACTIONs sent out by a user echo -ag /fignore -c <#channel [chan]> -- Ignores detection of FSAY/ACTIONs sent to a specific channel, \\\\\\\"chan\\\\\\\" is an optional argument that can be added to the command to only ignore in-channel detections, it will still be detected in the fsay window. echo -ag /fignore -r -- Unignores that FSAY/ACTION Nickname/Oper, putting no argument clears the list. echo -ag /fignore -l -- Lists the F-ignore list }