Hi folks,
Welcome a total newb who finds herself way too confused. I use a registered version of mIRC 6.12 . My network has a services bot, nickserv, that writes output like this:
List of entries matching *|*:
Dan|AFK [Hidden]
Dan|Away [Hidden]
Dan|School [Hidden]
Dan|Sleep [Hidden]
Dark_Razer|Work [Hidden]
. . .
y}}Pq}[e| [Hidden]
z|[j^J|_ [Hidden]
{j|[} [Hidden]
{_|_}
BigB@staff.XXXXXXXXXX.net |d{M}]^{Q [Hidden]
|O|{F\Wp [Hidden]
|WoRkInGbAsTaRd| ~mucas@XXXXXXXXXXXX.com
]\``E{|fX [Hidden]
End of list - 27/27 matches shown.
It turns out that some of these are the registered nicks of spammers of whom we'd like to purge our list. I've written a script which at first blush I thought pretty promising, but doesn't act as I expect.
#Spammerrec off
on *:NOTICE:*:*: { if ($nick == NickServ) {
if (List of entries matching isin $1-) {
./hmake -s Spamlist 10
/set %c 1
}
elseif (End != $1) && ([Hidden] == $2) {
/hadd Spamlist %c $1
/inc %c 1
}
elseif (End == $1) {
/dec %c 1
/while %c != 0 {
set -u %halt 1
.timerhalt. 1 0 if ($input(Drop $hget(Spamlist,%c) $+ ?,nqv,DROP USER?)) == $yes {
/unset %halt
/Echo 0,12 $hget(Spamlist,%c)
/msg nickserv info $hget(Spamlist,%c)
}
.timerhalt. -e
/dec %c 1
if %halt { halt }
}
./hfree -s Spamlist
/unset %c
}
}
}
#Spammerrec end
I must admit to being new to the concept of function identifiers that don't operate within a script, but on the basis of speed of execution I can understand why it is deemed necessary. I used some code I gleened from one of your posts within the while loop but must admit that I don't comprehend the necessity of the halt parameter/variable as a flag. The operative line seems to be .timerhalt. 1 0 if ($input(Drop $hget(Spamlist,%c) $+ ?,nqv,DROP USER?)). I understand the use of ./timerhalt 1 0 to be to time displace the $input until after the script operates. The rest of the line, if ($input(Drop $hget(Spamlist,%c) $+ ?,nqv,DROP USER?)), I comprehend places an "Input Window" on the screen showing a question mark (-q), returns an identifier; $yes, $no, $ok, or $cancel, (-v), and shows the yes, no, and cancel buttons (-n). It seems to handle the visual aspects of this fine and sequentially asks if I'd care to drop the user one by one in the reverse order in which they were loaded into the Spammer hash table. I intended the lines following to function according to the returned identifier value, but of course whereas they operate within the script and the $input windows operate after the script completes, they do not do what I expect. In short my timing is off. The script is obviously shown off in this example but when it runs it runs. What I do get is echo of each of the names entered into the hash table, and subsequently output from the same bot for information about each of the users named. Sample of output follows:
]\``E{|fX
info ]\``E{|fX
|O|{F\Wp
info |O|{F\Wp
|d{M}]^{Q
info |d{M}]^{Q
{j|[}
info {j|[}
z|[j^J|_
info z|[j^J|_
y}}Pq}[e|
info y}}Pq}[e|
. . .
Dark_Razer|Work
info Dark_Razer|Work
Dan|Sleep
info Dan|Sleep
Dan|School
info Dan|School
Dan|Away
info Dan|Away
Dan|AFK
info Dan|AFK
]\``E{|fX is yvpu
]\``E{|fX is currently online.
Time registered: Dec 09 17:11:54 2003 CST
== Unknown command
|O|{F\Wp is PKX.com
Time registered: Dec 08 19:38:28 2003 CST
Last seen time: Dec 08 19:40:43 2003 CST
== Unknown command
|d{M}]^{Q is EVuaC.org
Time registered: Dec 08 02:04:27 2003 CST
Last seen time: Dec 08 02:05:48 2003 CST
== Unknown command
{j|[} is jgq.com
Time registered: Dec 08 03:27:48 2003 CST
Last seen time: Dec 08 03:28:32 2003 CST
== Unknown command
z|[j^J|_ is sHSsYQNknC.org
Time registered: Dec 08 17:36:12 2003 CST
Last seen time: Dec 08 17:36:21 2003 CST
== Unknown command
y}}Pq}[e| is emVSMIyO.net
Time registered: Dec 09 01:11:04 2003 CST
Last seen time: Dec 09 01:12:18 2003 CST
== Unknown command
. . .
Dark_Razer|Work is dark
Time registered: Nov 20 21:09:44 2003 CST
Last seen time: Nov 20 21:12:07 2003 CST
Last quit message: Quit: Oh NOZ!!! IMA ETCHU!! IMA ETCHU!!
== Unknown command
Dan|Sleep is blah
Time registered: Aug 24 05:11:22 2003 CDT
Last seen time: Dec 09 07:41:46 2003 CST
Last quit message: Ping timeout
== Unknown command
Dan|School is blah
Time registered: Sep 22 11:15:07 2003 CDT
Last seen time: Dec 09 16:21:38 2003 CST
Last quit message: Ping timeout
== Unknown command
Dan|Away is blah
Time registered: Aug 25 17:38:40 2003 CDT
Last seen time: Nov 30 17:53:41 2003 CST
== Unknown command
Dan|AFK is blah
Time registered: Aug 24 17:34:41 2003 CDT
Last seen time: Dec 07 03:28:23 2003 CST
Last quit message: Ping timeout
== Unknown command
So I query, what purpose if any will the %halt flag serve, can the return from the $input be tested presumably in another script with another trigger than the "on NOTICE," if so what is a return from a $input designated (i.e., on what?), and finally, if these $input actions are taking place after my initial script is executed and if I've released the hash table, how are the names surviving the script to be in the $input action after the script completes?
Puzzled,
Caitlain