mIRC Home    About    Download    Register    News    Help

Print Thread
$comchan and $chan #70124 02/02/04 07:18 PM
Joined: Sep 2003
Posts: 38
S
snabbi Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 38
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)

Re: $comchan and $chan #70125 02/02/04 09:59 PM
Joined: Feb 2003
Posts: 2,803
Raccoon Offline
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,803
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


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
Re: $comchan and $chan #70126 03/02/04 08:39 PM
Joined: Sep 2003
Posts: 38
S
snabbi Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Sep 2003
Posts: 38
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.

Re: $comchan and $chan #70127 04/02/04 04:35 AM
Joined: Feb 2003
Posts: 810
C
cold Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
$snick(#channel) returns the same as $snicks, but related to #channel. $comchan could have the same behaviour.


* cold edits his posts 24/7