mIRC Home    About    Download    Register    News    Help

Print Thread
Cycling an empty op-less channel #205784 31/10/08 09:16 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
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

Re: Cycling an empty op-less channel [Re: Skeletor] #205785 31/10/08 09:29 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
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 }
}

Re: Cycling an empty op-less channel [Re: DJ_Sol] #205786 31/10/08 09:36 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Fantastic mate!

Cheers.


sub-zero.homeip.net:6667

Re: Cycling an empty op-less channel [Re: Skeletor] #205787 31/10/08 09:38 PM
Joined: Jan 2007
Posts: 1,156
D
DJ_Sol Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Np smile

Re: Cycling an empty op-less channel [Re: DJ_Sol] #205788 31/10/08 09:58 PM
Joined: Jan 2003
Posts: 2,523
Q
qwerty Offline
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
Re: Cycling an empty op-less channel [Re: qwerty] #205789 31/10/08 10:05 PM
Joined: Feb 2005
Posts: 185
S
Skeletor Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Feb 2005
Posts: 185
Wicked, Thanks to you both


sub-zero.homeip.net:6667