mIRC Home    About    Download    Register    News    Help

Print Thread
$chanmode problem #135812 17/11/05 01:34 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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 ?


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $chanmode problem #135813 17/11/05 02:16 PM
Joined: Aug 2004
Posts: 16
I
inti Offline
Pikka bird
Offline
Pikka bird
I
Joined: Aug 2004
Posts: 16
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


Regards,
KathY
Re: $chanmode problem #135814 17/11/05 04:19 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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:


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Re: $chanmode problem #135815 17/11/05 05:59 PM
Joined: Aug 2003
Posts: 314
S
Sigh Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Aug 2003
Posts: 314
Check if (k isincs $gettok($chan(#chan).mode,1,32))

Re: $chanmode problem #135816 18/11/05 03:46 AM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

Last edited by genius_at_work; 18/11/05 03:52 AM.
Re: $chanmode problem #135817 18/11/05 01:57 PM
Joined: Oct 2004
Posts: 8,330
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net