mIRC Homepage
Posted By: sparta $chanmode problem - 17/11/05 01:34 PM
I trying to make a small "cycle" script, the problem i have is that if the channel is +k'ed. then u cant be able to rejoin it again, $chanmode returns all possible channel modes for that channel, how do i filter out if the channel is +k and then they key ?
Posted By: inti Re: $chanmode problem - 17/11/05 02:16 PM
Hi.

Just test whether $chan(#).key has a value which is, of course, the key. If no key is specified, this identifier returns $false.

Regards
Posted By: sparta Re: $chanmode problem - 17/11/05 04:19 PM
it return $null if key arent set, but also if im not oped and key are set.. i only see the channel +k'ed when not oped, so the key wont be snatched there, but thats ok, now my next question, how would i make a litle script that can tell me if the channel is +k'ed or not? with or without op? :tongue:
Posted By: Sigh Re: $chanmode problem - 17/11/05 05:59 PM
Check if (k isincs $gettok($chan(#chan).mode,1,32))
Posted By: genius_at_work Re: $chanmode problem - 18/11/05 03:46 AM
Maybe this only applies to certain servers, but when I'm in a +k channel, I can use /hop to cycle the channel and I don't need a key to rejoin. I can also see the channel key using $chan(#).key even when I am not op'd.

If you can't get the key by using $chan(#).key, then see is you can see the key using $chan(#).mode . It would appear something like this: +fnstwk test (the key is 'test'). If this doesn't work, you may be able to get the key by typing /mode #channel and then reacting to the RAW-324 that is returned.

-genius_at_work
Posted By: Riamus2 Re: $chanmode problem - 18/11/05 01:57 PM
If you are not an op, you should not see the key. You should see a * instead.

Example:
+stnk *

If the network shows the key to anyone, it's not much use as long as you can get invited into the channel just once.
© mIRC Discussion Forums