mIRC Home    About    Download    Register    News    Help

Print Thread
channel info howmany ops and voices and regulars #113789
08/03/05 08:41 PM
08/03/05 08:41 PM
Joined: Feb 2005
Posts: 344
Nunspeet, the Netherlands
B
Bullseye Offline OP
Fjord artisan
Bullseye  Offline OP
Fjord artisan
B

Joined: Feb 2005
Posts: 344
Nunspeet, the Netherlands
I cant get this to work on join.

echo -a 12Channel Counter: 9There are13 $nick(#,0) 9Ppl present in 13 $chan 9=13 $opnick(#,0) 9Ops,13 $vnick(#,0) 9Voiced and13 $nopnick(#,0) 9regs.

I tryed it with this :

on ^*:JOIN:#:{
haltdef
if ($nick == $me) {
if ($chan != $chan:) {

Please help

Re: channel info howmany ops and voices and regula #113790
08/03/05 09:02 PM
08/03/05 09:02 PM
Joined: Dec 2002
Posts: 1,527
state of confusion
L
landonsandor Offline
Hoopy frood
landonsandor  Offline
Hoopy frood
L

Joined: Dec 2002
Posts: 1,527
state of confusion
See if this works:

Code:
on me:*:join:#channel: {
  //echo -a Channel Counter: There are $nick(#,0) Ppl present in $chan = $nick(#,0,o) Ops, $nick(#,0,v) Voiced and $nick(#,0,r) regs.
}


If that works for you, you would combine it into an existing ON JOIN event by doing this:

Code:
on *:join:#channel: {
  if ($nick == $me) { //echo -a Channel Counter: There are $nick(#,0) Ppl present in $chan = $nick(#,0,o) Ops, $nick(#,0,v) Voiced and $nick(#,0,r) regs. }
  more code
  more code
  more code
  more code
}



Hope this helps


Those who fail history are doomed to repeat it
Re: channel info howmany ops and voices and regula #113791
08/03/05 09:17 PM
08/03/05 09:17 PM
Joined: Dec 2002
Posts: 1,245
California, doooood
M
MikeChat Offline
Hoopy frood
MikeChat  Offline
Hoopy frood
M

Joined: Dec 2002
Posts: 1,245
California, doooood
did you try using a timer? The nicklist isnt filled right away when you join, so a timer will work:
Code:
on *:join:#: if ($nick == $me) { .timerchancount 1 1 ChanCount $chan }

alias ChanCount { echo -a 12Channel Counter: 9There are13 $nick($1,0) 9Ppl present in 13 $1 9=13 $opnick($1,0) 9Ops,13 $vnick($1,0) 9Voiced and13 $nopnick($1,0) 9regs. }


Re: channel info howmany ops and voices and regula #113792
08/03/05 09:30 PM
08/03/05 09:30 PM
Joined: Aug 2003
Posts: 1,831
I
Iori Offline
Hoopy frood
Iori  Offline
Hoopy frood
I

Joined: Aug 2003
Posts: 1,831
The reason it won't work is because at the point when you join a channel, mIRC doesn't know who else is on the channel yet, you should use the end of names list (raw 366).
  • :server.address 366 You #channel :End of /NAMES list.
    $1 = You
    $2 = #channel
Code:
raw 366:*:{
  echo [color:blue]$2[/color] 12Channel Counter: 9There are13 $nick([color:blue]$2[/color],0) 9Ppl present in 13 [color:blue]$2[/color] 9=13 $nick([color:blue]$2[/color],0,o) 9Ops,13 $nick([color:blue]$2[/color],0,v,o) 9Voiced and13 $nick([color:blue]$2[/color],0,r) 9regs.
}