mIRC Home    About    Download    Register    News    Help

Print Thread
#112159 21/02/05 05:25 PM
Joined: Jan 2005
Posts: 20
S
Smil3r Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 20
Hey,

I'm tryin to get some basic info shown when I join channels, like.. Number of ops, voices, etc. Also the channel modes. e.g

[11:35:40] --› (Channel) You have joined [#test]
[11:35:40] --› (Channel) Modes [+ntr]
[11:35:40] --› (Channel) Ops [2] Voices [8]

and so on.

I'm not quite sure where to start with it, so any help would be appreciated.


Cheers,

-Smil3r

#112160 21/02/05 06:07 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
Raw 329:*: {
  echo 12 -a $iif($nick($2,0,o),Ops: $nick($2,0,o),Ops: None) 
  echo 3 -a $iif($nick($2,0,v),Voiced: $nick($2,0,v),Voiced: None)
  echo 4 -a $iif($nick($2,0,r),Regular: $nick($2,0,r),Regular: None)
  echo 1 -a Total: $nick($2,0)
}

#112161 21/02/05 07:27 PM
Joined: Jan 2005
Posts: 20
S
Smil3r Offline OP
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Jan 2005
Posts: 20

Hey,

That's cool thanks. Worked fine.

What about the channel modes? Is there a way to do that?


-Smil3r

#112162 21/02/05 07:55 PM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Just like Slade showed you above but with a different raw #.
Code:
 raw 324:*: {
  echo 9 -a $2 Modes: $3
}
 

$2 is optional it will return the "#channelname Modes: +whatevermodes" so removing the $2 will return "Modes: +whatevermodes"
Question: This isnt a real big problem just a curiosity.
I was trying out your raw command there Slade and i seem to be getting 2 returns on the event ... in other words on joining a channel i get the raw 324 and 329 twice. Any ideas why that might be happening?

Edit: If you want to know the raw event # for something type "/debug @debug" then do whatever to trigger the raw... aka whois a user , join a channel etc.

Last edited by JAFO; 21/02/05 07:56 PM.
#112163 21/02/05 08:12 PM
Joined: Aug 2004
Posts: 237
L
Fjord artisan
Offline
Fjord artisan
L
Joined: Aug 2004
Posts: 237
Quote:
Question: This isnt a real big problem just a curiosity.
I was trying out your raw command there Slade and i seem to be getting 2 returns on the event ... in other words on joining a channel i get the raw 324 and 329 twice. Any ideas why that might be happening?

Same problem:
[2005 Mon 21 Feb][21:08:40] * Topic: 'www.mateus.be check the latest version'
[2005 Mon 21 Feb][21:08:40] * Set by Oh_Yeah|Afwezig on Mon Feb 21 19:13:46 2005
[2005 Mon 21 Feb][21:08:40] -L- [#5-IB] Welkom op het #6-ib channel !!!
[2005 Mon 21 Feb][21:08:40] * L sets mode: +o LethPhaos
[2005 Mon 21 Feb][21:08:40] * Users: Total: 7 / Ops: 6 / Voices: 1 / Regular: 0
[2005 Mon 21 Feb][21:08:40] * Chanmode: +Cntul 1337
[2005 Mon 21 Feb][21:08:40] * Users: Total: 7 / Ops: 6 / Voices: 1 / Regular: 0
[2005 Mon 21 Feb][21:08:40] * Chanmode: +Cntul 1337
[2005 Mon 21 Feb][21:08:40] * LethPhaos sets mode: +v LethPhaos
I'm using raw 324 for it. I'm having this problem only in certain channels.

#112164 21/02/05 11:30 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
On some IRCDs modes are only available to ops , so if you are opped before recieving the modes, as you were in that example, mIRC requests them again.

#112165 22/02/05 04:19 AM
Joined: Sep 2004
Posts: 237
Fjord artisan
Offline
Fjord artisan
Joined: Sep 2004
Posts: 237
Ahhh..... Thanks! wink

#112166 22/02/05 01:10 PM
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Quote:

Edit: If you want to know the raw event # for something type "/debug @debug" then do whatever to trigger the raw... aka whois a user , join a channel etc.


You could also use:
Raw <numeric>:<matchtext>:<commands>

Code:
Raw *:*: {
  echo -a In Raw Numeric $numeric you can use $($1,0) to $($,0) $+ $0
}


The above isn't really necessary all you really need it to do is echo the $numeric. The above returns the number of space delimited lines in the $1- string.

For example, you'll get the following if you type an Unknown Command.

In Raw Numeric 421 you can use $1 to $4.

And instantly we know we can use:

Code:
Raw 421:*: {
  $1 $2 $3 $4
}


Or..

Code:
Raw 421:*: {
  $1-
}

But not $5.


Link Copied to Clipboard