!next (help support script) - 07/06/11 01:39 PM
I found this code on the forum. It's exactly what I need. I tried to solve it, but this is to advanced for me.
Notes:
(15:17:36) (@Vliedel) look at the nwait alias
(15:17:56) (@Vliedel) you return the evaluated variable if prop = noop
(15:18:12) (@Vliedel) and else you return the non evaluated variable
Error:
* /set: invalid parameters (line 4, script1.mrc)
Notes:
(15:17:36) (@Vliedel) look at the nwait alias
(15:17:56) (@Vliedel) you return the evaluated variable if prop = noop
(15:18:12) (@Vliedel) and else you return the non evaluated variable
Error:
* /set: invalid parameters (line 4, script1.mrc)
Code:
on *:DISCONNECT:{ unset $+(%,wait:,$cid,:*) } on @*:JOIN:#:{ set $nwait($chan).noop $nwait($chan) $nick $+(.timerWait:,$cid,:,$chan) 1 5 nWaitAdminMsg $chan } on !*:NICK:{ var %x = 1, %c, %n = /(?<=^| )\Q $+ $replacecs($nick,\E,\E\\E\Q) $+ \E(?= |$)/ while ($comchan($nick,%x)) { %c = $v1 set $nwait(%c).noop $regsubex($nwait(%c),%n,$newnick) inc %x } } on *:TEXT:!next:#:{ var %n = $nwait(#) while ($$gettok(%n,1,32) !isreg #) %n = $gettok(%n,2-,32) mode # +v $gettok(%n,1,32) set $nwait(#).noop $gettok(%n,2-,32) } alias nWait { if ($prop == noop) { return $($+(%,wait:,$cid,:,$1),2) } return $+(%,wait:,$cid,:,$1) } alias nWaitAdminMsg { if ($me !isop $1) { unset $nwait($1).noop } else { var %n = $nwait($1), %r, %x = 1 while ($gettok(%n,%x,32)) { if ($v1 ison $1) { %r = %r $v1 } inc %x } if (!%r) { unset $nwait($1).noop } else { set $nwait($1).noop %r var %x = 1, %a while ($ulist(*,admin,%x)) { %a = $addtok(%a,$v1,44) | inc %x } if (%a) { msg %a The following users are waiting for help: %r } } } }