mIRC Home    About    Download    Register    News    Help

Print Thread
on join.. #19107 14/04/03 03:16 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
I'm looking for a scipt. Usually when I would enter the channel it would display the following:


*Number of Total People
*Number of Channel Ops
*Number of Channel Voices
*Number of Regulars
*Number of Aways
*Number of Bans


I don't remember if it was a snippet or an addon but I can't seem to locate it. Anyone know how I may be able do something similar? Any help would be appreciated.

Re: on join.. #19108 14/04/03 03:31 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Here is something to work with


Code:
  [color:red]on *:join:#: {
  echo 1 1415 12Quick Channel Stats for # $+  
  echo 1 1415 2Ops:14(18 $+ $opnick(#,0) $+ 14)2 
  echo 1 1415 Voice:14(18 $+ $vnick(#,0) $+ 14)2
  echo 1 1415 Non-Ops:14(18 $+ $nvnick(#,0) $+ 14)2
  echo 1 1415 Total:14(18 $+ $nick(#,0) $+ 14)
}  [/color]  





Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Re: on join.. #19109 14/04/03 04:17 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Ok somethings not right with that...When I join the channel with approximately 6 ops in the services channel on the network I frequent, 7 including myself I get this:

Quick Channel Stats for #Services
Ops:(0)
Voice:(0)
Non-Ops:(1)
Total:(1)

I think thats somewhat a bit off...also if possible I would like to be able to have it list the number of bans for that channel (if any) and any aways. But so far this is the general idea I was hoping for...any additional suggestions? Thanks again!

Re: on join.. #19110 14/04/03 05:17 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
Code:
ON *:JOIN:#: {
  if ($nick == $me) {
    echo -ta User levels are: $nick($active,0,o) Ops, $nick($active,0,v) Voices, $nick($active,0,h) Halfops, $nick($active,0,u) Userops, $nick($active,0,r) Normal users, $nick($active,0) Total users, $ibl($active,0) Bans.
  }
}


Not tested in the ON JOIN environment but in theory should work. Just edit out the mode types that don't apply to your network. :grin;

I do know that if you have access to the channel this won't be shown here unless you run the /echo as an alias.

Code:
EG ON *:JOIN:#: {
  if ($nick == $me) {
    .timer 1 1 cumodes
  }
}


...then

Code:
alias cumodes {
  echo -ta User levels are: $nick($active,0,o) Ops, $nick($active,0,v) Voices, $nick($active,0,h) Halfops, $nick($active,0,u) Userops, $nick($active,0,r) Normal users, $nick($active,0) Total users, $ibl($active,0) Bans.
}

Re: on join.. #19111 14/04/03 05:19 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Well that can't work because at the moment you join a channel, mIRC knows of only ONE user for that channel, You smile

You have to wait until you've recieved the names list, (Raw) 366 YourNick #channel :End of /NAMES list.
Code:
raw 366:*:{
  echo $2 1 1415 12Quick Channel Stats for $2
  echo $2 1 1415 2Ops:14(18 $+ $nick(#,0,o) $+ 14)2
  echo $2 1 1415 Voice:14(18 $+ $nick(#,0,v) $+ 14)2
  echo $2 1 1415 Non-Ops:14(18 $+ $nick(#,0,r) $+ 14)2
  echo $2 1 1415 Total:14(18 $+ $nick(#,0) $+ 14)
}


To get the other items,
- /who #channel
- - raw 352 <- parse the replies to inc a var or something if G in $7
- - raw 315 <- echo how many users are away

- /mode #channel b
- raw 368 is end of banlist, now you can echo the total number of bans

Check Hammers snippet Here

[edit] raw 368 is the end of banlist smile

Re: on join.. #19112 14/04/03 05:52 AM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
$ibl(#,0) would be a cleaner way to get the number of bans.

Re: on join.. #19113 14/04/03 05:55 AM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Cleaner than what?

Re: on join.. #19114 14/04/03 06:07 AM
Joined: Dec 2002
Posts: 417
O
Othello Offline
Fjord artisan
Offline
Fjord artisan
O
Joined: Dec 2002
Posts: 417
Thanks Nimue and Watchdog

I did not check the on join The Script I Use is in popup channel
and it returned this

1 1415 12Quick Channel Stats for #mpgoldies
1 1415 2Ops:14(18914)2 Voice:14(18714)2 Non-Ops:14(182314)2 Total:14(183914)

Now if The_Game can get a clone count on top of that, then he would have full channel stats grin




Intelligence: It's better to ask a stupid question, then to prove it by not asking....
Re: on join.. #19115 14/04/03 06:18 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
You can't always get a clone count. Some networks mask hostnames and IP addresses (an increasingly popular policy) and in this situation a clone scanner is completely out of the question unless you are an oper and the IRCd you use is capable of telling you when concurrent connections from one IP reach a given level.

Re: on join.. #19116 14/04/03 05:13 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Quote:
- /mode #channel b
- raw 368 is end of banlist, now you can echo the total number of bans


Cleaner than that...

Re: on join.. #19117 14/04/03 05:25 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
My post didn't say HOW to display it, rather when you COULD display it. smile
Without first doing a "/mode # b" mIRC can't know the full banlist. wink

Re: on join.. #19118 15/04/03 12:16 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Thanks everyone...as for what i was looking for, I think hammers snippett was the one that i saw...anyways it does what i wanted so im not complaining grin

Thanks again everyone

Re: on join.. #19119 15/04/03 02:16 AM
Joined: Dec 2002
Posts: 2,985
Watchdog Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 2,985
I wonder where Hammer disapeared to, he suddnely stopped coming...

'Spose it's a mans right to come and go but he was the top poster for a long time.

Re: on join.. #19120 15/04/03 08:25 AM
Joined: Dec 2002
Posts: 1,237
T
The_Game Offline OP
Hoopy frood
OP Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 1,237
Probably taking the well deserved break. Many of his posts were mainly coding. Either he's taking the long vacation or he found a new hobby LOL smile

Re: on join.. #19121 18/04/03 06:22 PM
Joined: Dec 2002
Posts: 17
C
Chimera Offline
Pikka bird
Offline
Pikka bird
C
Joined: Dec 2002
Posts: 17
When someone joins a channel you are on, is there any difference between
on *:JOIN:#: if ($istok($aop($fulladdress).type,$chan,44)) { do something }
and
on *:JOIN:#: if ($nick isaop $chan) { do something }
I did it the long way first forgetting about isaop, but is there a circumstance where it would give a different result?

Re: on join.. #19122 18/04/03 07:27 PM
Joined: Dec 2002
Posts: 699
N
Nimue Offline
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
Yes.

on *:JOIN:#: if ($istok($aop($fulladdress).type,$chan,44)) { do something }
Will be $true if you have added $nick to your aop list for that channel.

BTW:
on *:JOIN:#:if $ial($nick) isaop # { do something }
Does exactly the same thing. smile

and

on *:JOIN:#: if ($nick isop $chan) { do something }
Will always be false.
A user can not be opped at the time of joining a channel.
You must first be ON the chan (after the 'on join') before you can be opped on it.