mIRC Home    About    Download    Register    News    Help

Print Thread
raw 353:*:{ help #14004 03/03/03 05:08 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
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.



;Check for Life

if (%life == $null) {
goto getlife
}
Re: raw 353:*:{ help #14005 03/03/03 05:25 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
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?



;Check for Life

if (%life == $null) {
goto getlife
}
Re: raw 353:*:{ help #14006 03/03/03 05:31 PM
Joined: Jan 2003
Posts: 237
X
xrn0id Offline OP
Fjord artisan
OP Offline
Fjord artisan
X
Joined: Jan 2003
Posts: 237
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?



;Check for Life

if (%life == $null) {
goto getlife
}
Re: raw 353:*:{ help #14007 03/03/03 06:59 PM
Joined: Dec 2002
Posts: 395
M
MonoSex Offline
Fjord artisan
Offline
Fjord artisan
M
Joined: Dec 2002
Posts: 395
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.

Re: raw 353:*:{ help #14008 03/03/03 07:18 PM
Joined: Dec 2002
Posts: 169
J
Jerk Offline
Vogon poet
Offline
Vogon poet
J
Joined: Dec 2002
Posts: 169
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)
  }
}