mIRC Homepage
Posted By: snabbi $comchan and $chan - 02/02/04 07:18 PM
I am wondering why isn't $comchan (maybe also $chan) identified as:
$comchan($nick) returning #room1,#room2
This would make it a lot faster than iterating over each room.
You'd could use $istok and $gettok depending what you would like it to be used for.

(Yes I know you can create it yourself by creating a var or alias that iterates all chans)
Posted By: Raccoon Re: $comchan and $chan - 02/02/04 09:59 PM
It's similiarly true for all listing identifiers. $nick $chan $window etc

I think the only identifier that strings them all together is $snicks, which lists all of $snick(#,%i). The only difference here is that $snicks goes by the $active window, where as $comchans should assume, $nick?

[color:000099]/comchans { var %s, %i = 0 | WHILE $comchan($nick,%i) { var %s = %s $ifmatch | inc %i } | return %s }[/color]

And you can tweek it to taste...

[color:000099]/comchans { var %s, %i = 0 | WHILE $comchan($nick,%i) { var %s = $addtok(%s,$ifmatch,44) | inc %i } | return %s }[/color]

- Raccoon
Posted By: snabbi Re: $comchan and $chan - 03/02/04 08:39 PM
Well i know it's really simply to create, which i had already done but we from the dutch helpdesk can't see the advantages of identifying commands like $comchan as it is done now.
Surely it would be faster if it was coded in the mirccode itself and lose none info whatsover.
$chan(4) would be $gettok($chan().open,4,44) or what so ever.
Posted By: cold Re: $comchan and $chan - 04/02/04 04:35 AM
$snick(#channel) returns the same as $snicks, but related to #channel. $comchan could have the same behaviour.
© mIRC Discussion Forums