Well, you made lots of modifications - more than the requests in your previous post necessitate. Here and there (putmsg, %help(author) for example) it's not very clear to me what funtionality you're after. Adding extensive features won't ease debugging - it's now very hard to test your script in action - I'd have to set up both chan, pchan and mchan with various clients each. I suggest to not add additional functions till all modifications of the "core" script are working properly smile
In general, try to debug the code and make it as verbose as necessary:
- Put the -s switch at all the /hadd /hdel /hfree /set /writeini etc commands
- De-silence commands (e.g: .timer -> timer )
Then, try to narrow down what makes the script to fail (which scenario -> which alias/event -> which command in the alias/event).


However - not by testing but mere reading of your code - I noticed the following:

1) Atm no join event is left, you're adding users right after "queueme" -> invite command - but there's no check whether a user actually joins the helpchan.
Alike, the "you've been voiced"-info - this shouldn't be sent right after the voice command but rather "on voice" (and if the voiced user in queue); alike the queue-remtok at !done -> kick command - better use the on kick event.

2) At !done (which triggers on text at %help(pchan) and not at %help(chan) !), you're currently using $chan = %help(pchan) and not %help(chan) in the hadd command. You're thus manipulating the (nonexistent) queue of pchan. But, as stated above, better update the queue on kick.

3) If %help(chan) can be but a single channel, no "on quit"/"on nick"-loops with $hfind(r) are required. That (and the nickreg alias) was made to account for multiple help channels with separate queues. A "ison"-check -> $remtok should suffice in your case.

4) Why the check for %help. [ $+ [ $nick ] ] ?
You can check whether a nick is in the queue with
Quote:
if ($istok($hget($ht,%help(chan)),$nick,32)) { }
. This would also be be more accurate as the hash table updates with various events (nick,part,quit,kick...) while thes variables do not.

5) Add a basic flood protection for all the replies of "queueme". If "putcmd" does not provide a sufficient flood protection, you should add one there as well.

Good luck smile