mIRC Home    About    Download    Register    News    Help

Print Thread
#211566 22/04/09 11:05 AM
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
exactly as the title says. If i am the only one left in my channel and i am not a op il hop

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
...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 # }

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Shouldn't $nick(#,0) == 2 be $nick(#,0) == 1 , since it will only be 1 person on the channel?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Jun 2004
Posts: 133
S
state Offline OP
Vogon poet
OP Offline
Vogon poet
S
Joined: Jun 2004
Posts: 133
safe it worked

thanks

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
no.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Joined: Mar 2009
Posts: 74
K
Babel fish
Offline
Babel fish
K
Joined: Mar 2009
Posts: 74
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.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
As a sidenote, triggering before is an intentional design choice. It allows for standard checks like "if ($nick isop #)" to still be valid.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard