mIRC Homepage
Posted By: Smil3r Join Stuff - 21/02/05 05:25 PM
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
Posted By: SladeKraven Re: Join Stuff - 21/02/05 06:07 PM
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)
}
Posted By: Smil3r Re: Join Stuff - 21/02/05 07:27 PM

Hey,

That's cool thanks. Worked fine.

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


-Smil3r
Posted By: JAFO Re: Join Stuff - 21/02/05 07:55 PM
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.
Posted By: LethPhaos Re: Join Stuff - 21/02/05 08:12 PM
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.
Posted By: Iori Re: Join Stuff - 21/02/05 11:30 PM
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.
Posted By: JAFO Re: Join Stuff - 22/02/05 04:19 AM
Ahhh..... Thanks! wink
Posted By: SladeKraven Re: Join Stuff - 22/02/05 01:10 PM
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.
© mIRC Discussion Forums