mIRC Homepage
Posted By: lds Noobish question - 21/09/12 05:35 AM
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.
Posted By: 5618 Re: Noobish question - 21/09/12 05:39 AM
$chan($chan).mode returns the list of set channel modes, so you'd use something like:
Code:
if (c isincs $chan($chan).mode)
Posted By: Masoud Re: Noobish question - 21/09/12 08:14 AM
To prevent any further issues, it's better to use
Code:
if (c isincs $gettok($chan($chan).mode,1,32)) { ... }
Posted By: 5618 Re: Noobish question - 21/09/12 08:37 AM
Right, because of the possible presence of a channel key in $chan($chan).mode, which may contain a lower case c.
Posted By: Tomao Re: Noobish question - 21/09/12 04:18 PM
You're not alone. I've seen lots of people use the non-gettok version...:P
Posted By: lds Re: Noobish question - 21/09/12 05:22 PM
Thanks works great. smile
© mIRC Discussion Forums