mIRC Home    About    Download    Register    News    Help

Print Thread
S
Skeletor
Skeletor
S
Hey,

I was after a script which when a channel has become op-less and empty, ie only me in $chan without ops, it would automatically /hop that channel to regain ops.

I have already made the groups and the dialog with check box. the next part has completely gone over my head.

Any ideas?

D
DJ_Sol
DJ_Sol
D
on *:part:#:{
if ($nick(#,0,o) == 0) && ($nick(#,0,q) == 0) { hop $chan }
}

S
Skeletor
Skeletor
S
Fantastic mate!

Cheers.

D
DJ_Sol
DJ_Sol
D
Np smile

Joined: Jan 2003
Posts: 2,125
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,125
When a user parts a channel, $nick() still counts them inside the on PART event (unless /updatenl is called prior to $nick()). Also, you don't want the event to trigger when you part. So something like this should be used:
Code:
on !*:part:#: if $nick(#,0) == 2 && !$nick(#,$me,oq) { hop # }

S
Skeletor
Skeletor
S
Wicked, Thanks to you both


Link Copied to Clipboard