mIRC Home    About    Download    Register    News    Help

Print Thread
Noobish question #239086 21/09/12 05:35 AM
Joined: Oct 2011
Posts: 4
L
lds Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Oct 2011
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.

Re: Noobish question [Re: lds] #239087 21/09/12 05:39 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
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)

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


Nothing...
Re: Noobish question [Re: Masoud] #239089 21/09/12 08:37 AM
Joined: Jun 2007
Posts: 933
5
5618 Offline
Hoopy frood
Offline
Hoopy frood
5
Joined: Jun 2007
Posts: 933
Right, because of the possible presence of a channel key in $chan($chan).mode, which may contain a lower case c.

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

Re: Noobish question [Re: lds] #239098 21/09/12 05:22 PM
Joined: Oct 2011
Posts: 4
L
lds Offline OP
Self-satisified door
OP Offline
Self-satisified door
L
Joined: Oct 2011
Posts: 4
Thanks works great. smile