mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2005
Posts: 185
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
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?


sub-zero.homeip.net:6667

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
on *:part:#:{
if ($nick(#,0,o) == 0) && ($nick(#,0,q) == 0) { hop $chan }
}

Joined: Feb 2005
Posts: 185
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Fantastic mate!

Cheers.


sub-zero.homeip.net:6667

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Np smile

Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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 # }


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Feb 2005
Posts: 185
S
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Wicked, Thanks to you both


sub-zero.homeip.net:6667


Link Copied to Clipboard