mIRC Home    About    Download    Register    News    Help

Topic Options
#239086 - 21/09/12 06:35 AM Noobish question
lds Offline
Self-satisified door

Registered: 23/10/11
Posts: 4
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.

Top
#239087 - 21/09/12 06:39 AM Re: Noobish question [Re: lds]
5618 Offline
Hoopy frood

Registered: 18/06/07
Posts: 933
$chan($chan).mode returns the list of set channel modes, so you'd use something like:
Code:
if (c isincs $chan($chan).mode)

Top
#239088 - 21/09/12 09:14 AM Re: Noobish question [Re: 5618]
Masoud Offline
Vogon poet

Registered: 01/03/10
Posts: 142
Loc: London, UK
To prevent any further issues, it's better to use
Code:
if (c isincs $gettok($chan($chan).mode,1,32)) { ... }
_________________________
Nothing...

Top
#239089 - 21/09/12 09:37 AM Re: Noobish question [Re: Masoud]
5618 Offline
Hoopy frood

Registered: 18/06/07
Posts: 933
Right, because of the possible presence of a channel key in $chan($chan).mode, which may contain a lower case c.

Top
#239095 - 21/09/12 05:18 PM Re: Noobish question [Re: 5618]
Tomao Offline
Hoopy frood

Registered: 07/07/07
Posts: 1129
Loc: United States
You're not alone. I've seen lots of people use the non-gettok version...:P

Top
#239098 - 21/09/12 06:22 PM Re: Noobish question [Re: lds]
lds Offline
Self-satisified door

Registered: 23/10/11
Posts: 4
Thanks works great. smile

Top