mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2003
Posts: 101
root66 Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2003
Posts: 101
I think $comchan needs some improved functionality for multi-server support. An extra parameter for the $cid would improve it a lot.


Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Why? Just because someone with a nick is in the same room with you on one connection, it doesn't mean that they are the same person using that nick on another connection, since most likely, it will be different servers.

cool

Joined: Aug 2003
Posts: 325
W
Fjord artisan
Offline
Fjord artisan
W
Joined: Aug 2003
Posts: 325
Code:
alias comchanM {
  var %nick = $1, %room = $2, %cid = $3, %cx = $scon(0), %num
  if ($0 != 3 || (%cid == 0 && %room != 0)) { echo -s $!comchanM invalid parameters | halt }
  if (%cid != 0) { scid %cid | return $iif($prop == net,$network,$($+($,comchan(%nick,%room),$iif($prop,$+(.,$prop))),2)) }
  while (%cx) { scid $scon(%cx) | inc %num $comchan(%nick,0) | scid -r | dec %cx }
  return %num
}


Usage: $comchanm(nick,channel,cid).property

Same properties as $comchan, with a new one: net
$comchanm(nick,0,0) = total rooms
$comchanm(nick,0,1) = total rooms on first connection
$comchanm(nick,1,1) = name of first room on first connection
$comchanm(nick,x,1).net = name of first connection network

other properties work the same (.op, .help, .voice)

Enjoy.

Joined: Oct 2003
Posts: 101
root66 Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Oct 2003
Posts: 101
thanks for your reply!

actually, I did not mean for it to tally up common channels across networks. the idea is to use $comchan like normal, but specifying a connection id for non event-related situations where you can't reference $cid.

Edit: For now I am just making aliases and using /scon

Last edited by root66; 11/05/04 05:50 AM.

Link Copied to Clipboard