on *:text:*:#: {
; If you need to check the $nick, you can do so here and stick everything
; that follows inside that IF's brackets. Otherwise, if the command can
; be used by everyone, then don't bother including the $nick check from your original code.
if ($1 == !check) { msg $chan !pl }
elseif ($nick == ServerBot && (Allies: == $1 || Soviets: == $1)) {
; Perform whatever check you need to determine if there are matches.
; You didn't explain how that was decided, so just put that code here.
; Set it to %pl.match in the format of name1 name2 name3
if (%pl.match) {
var %t = $numtok(%pl.match,32)
msg $chan Found %t player $+ $iif(%t > 1,s) on watch list. Performing Search.
; Note that here, depending on how you need to format the name(s) for !pi,
; you may have to loop through using $gettok() to run the command on every match.
msg $chan !pi %pl.match
}
}
elseif ($nick == ServerBot && ($4 == Sov || $4 == All)) {
; You may need to adjust the IF to a better method of determining that the text is your data.
; You will also need to add in whatever code you need for the script to log and notice admins.
msg $chan Info logged and notice sent to admins.
}
}