mIRC Homepage
Posted By: poormillionaire $rantok identifier - 02/10/06 06:25 PM
How about adding the $rantok identifier?

So $rantok(%var,32) is the same as $gettok(%var,$rand(1,$numtok(%var,32)),32)

It picks a random token like $rantok(lol lol2 lol3,32) = lol or $rantok(lol lol2 lol3,32) = lol3
Posted By: DaveC Re: $rantok identifier - 02/10/06 08:37 PM
For now....

alias rantok { if ($isid) { return $gettok($1,$rand(1,$numtok($1,$2)),$2) } | :error }
Posted By: starbucks_mafia Re: $rantok identifier - 02/10/06 11:31 PM
That error handler does nothing...
Posted By: Jae Re: $rantok identifier - 03/10/06 05:27 AM
Quote:
That error handler does nothing...

isnt that the point?
Posted By: starbucks_mafia Re: $rantok identifier - 03/10/06 01:29 PM
No, I mean it does nothing, as in the same thing would happen even if it wasn't there. It doesn't reset the error or anything (and there's no reason you'd want it to), it just takes up 13 bytes on a harddisk. Won't somebody please think of the bytes!
Posted By: Mpdreamz Re: $rantok identifier - 03/10/06 02:03 PM
Poor bytes frown
Code:
alias rantok if ($isid) return $gettok($1,$r(1,$numtok($1,$2)),$2)
Posted By: poormillionaire Re: $rantok identifier - 03/10/06 04:53 PM
There are many other $tok's that can also be done without being built-in. For example, $numtok(..,32) is the same as $gettok(..,0,32).

So it's not about the bytes.
© mIRC Discussion Forums