mIRC Homepage
Posted By: xrn0id raw 353:*:{ help - 03/03/03 05:08 PM
what I want to do is when I join a channel it echo's how many ops, voice's, and normal users are in teh server. How can I use raw to do this? raw 353 echos:

353 xrn0id[sch] = #test xrn0id[sch] @xrn0id

so would I somehow count $4- or something? help is greatly appreciated.
Posted By: xrn0id Re: raw 353:*:{ help - 03/03/03 05:25 PM
hehe nm, i got it:

$count($4-,N) how many are in channel
$count($4-,@) how many are ops
$count($4-,%) how many are half ops
$count($4-,+) how many are voices

and for normal users i would do:

Code:
set %users $count($4-,N)
set %ops $count($4-,@)
set %half $count($4-,%)
set %voice $count($4-,+)

set %temp $calc(%ops + %half + %voice)
set %normal $calc(%users - %temp)
echo %normal


that would work right?
Posted By: xrn0id Re: raw 353:*:{ help - 03/03/03 05:31 PM
UPDATE:

that scripts *works* on small channels. But it dosnt on big ones. Im guessing its because it sends info in more than one line? (The raw event)

raw 353 xrn0id = #test user1 user2 user3 user4
raw 353 xrn0id = #test user5 user6 user7 user8

how can i get aroudn this?
Posted By: MonoSex Re: raw 353:*:{ help - 03/03/03 06:59 PM
You can use:

$nick(#channel,0,o) = ops
$nick(#channel,0,v) = voices
$nick(#channel,0,r) = normal users
etc.

Your IAL must be updated for this, so it won't work in ON JOIN event.
Posted By: Jerk Re: raw 353:*:{ help - 03/03/03 07:18 PM
Use the end of names reply instead of the name reply itself. Like Monosex says, you can use $nick(#,0,0) once you are finished getting the names replies. Example:
Code:
raw 366:*: {
  if ($me ison $2) {
    echo $color(info) -ti2 $2 Ops: $nick($2,0,o)
    echo $color(info) -ti2 $2 Half-Ops: $nick($2,0,h)
    echo $color(info) -ti2 $2 Voiced: $nick($2,0,v)
    echo $color(info) -ti2 $2 Regular: $nick($2,0,r)
  }
}


© mIRC Discussion Forums