mIRC Home    About    Download    Register    News    Help

Print Thread
#239086 21/09/12 05:35 AM
L
lds
lds
L
Forgive my noobishness, and this is likely something very simple but I can't seem to find the answer.

I have an on text script that sends out an auto-reply but it uses colored text...which is fine except when on a channel with mode +c. Is there any identifier that I can use to check if the mode is set +c? Then with a simple if statement i can setup my script to send a non-colored version to those channels, while keeping my colored version for other channels.

#239087 21/09/12 05:39 AM
5
5618
5618
5
$chan($chan).mode returns the list of set channel modes, so you'd use something like:
Code:
if (c isincs $chan($chan).mode)

#239088 21/09/12 08:14 AM
Joined: Mar 2010
Posts: 144
Vogon poet
Offline
Vogon poet
Joined: Mar 2010
Posts: 144
To prevent any further issues, it's better to use
Code:
if (c isincs $gettok($chan($chan).mode,1,32)) { ... }


Nothing...
Masoud #239089 21/09/12 08:37 AM
5
5618
5618
5
Right, because of the possible presence of a channel key in $chan($chan).mode, which may contain a lower case c.

#239095 21/09/12 04:18 PM
Joined: Jul 2007
Posts: 1,124
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,124
You're not alone. I've seen lots of people use the non-gettok version...:P

#239098 21/09/12 05:22 PM
L
lds
lds
L
Thanks works great. smile


Link Copied to Clipboard