mIRC Homepage
Posted By: state Regain op empty channel - 22/04/09 11:05 AM
exactly as the title says. If i am the only one left in my channel and i am not a op il hop
Posted By: Collective Re: Regain op empty channel - 22/04/09 11:53 AM
...and the question is what?

If you want a script to hop the channel when the the last person leaves then you can use this:
Code:
on !*:PART:#:if ( $nick(#,0) == 2 ) && ( $me !isop # ) { hop -c # }
Posted By: DJ_Sol Re: Regain op empty channel - 22/04/09 04:15 PM
There are also ways to set an owner or host key. Then you can just send the password request and you will be made a host or owner.
Posted By: sparta Re: Regain op empty channel - 22/04/09 05:57 PM
Shouldn't $nick(#,0) == 2 be $nick(#,0) == 1 , since it will only be 1 person on the channel?
Posted By: state Re: Regain op empty channel - 22/04/09 06:02 PM
safe it worked

thanks
Posted By: argv0 Re: Regain op empty channel - 22/04/09 06:21 PM
no.
Posted By: KageNoOni Re: Regain op empty channel - 23/04/09 03:52 AM
The On Part triggers seem to see the channel just before the person leaves, instead of just after. As a result, if you're checking to see if you're the only one left, you would need to account for the person who just left, as well as yourself. That's why it checks for 2 people, and not 1.
Posted By: argv0 Re: Regain op empty channel - 23/04/09 06:39 AM
As a sidenote, triggering before is an intentional design choice. It allows for standard checks like "if ($nick isop #)" to still be valid.
© mIRC Discussion Forums