mIRC Home    About    Download    Register    News    Help

Print Thread
#242525 29/07/13 11:01 AM
Joined: Mar 2012
Posts: 10
H
Pikka bird
OP Offline
Pikka bird
H
Joined: Mar 2012
Posts: 10
Is there an easy if-then-else statement I can
use to determine if I am in a specific channel?

holbrook #242527 29/07/13 11:53 AM
Joined: Feb 2006
Posts: 181
C
Vogon poet
Offline
Vogon poet
C
Joined: Feb 2006
Posts: 181
Originally Posted By: "Help file"
ison nickname v1 is on channel v2


Code:
if ($me ison #channel) echo TRUE
else echo FALSE


/help if then else
/help $me

Crinul #242531 29/07/13 10:37 PM
Joined: Mar 2012
Posts: 10
H
Pikka bird
OP Offline
Pikka bird
H
Joined: Mar 2012
Posts: 10
That works perfect. Was thinking isin vs ison. Thanks!

holbrook #242532 29/07/13 11:29 PM
Joined: Jul 2007
Posts: 1,129
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Jul 2007
Posts: 1,129
isin operator means to see something inside a string, so if $me isin $chan will have to tell mirc to check if your nickname is within the channel name.

#chan_holbrook <- this channel name will trigger the isin operator.

I've seen them both used mistakenly in the past.


Link Copied to Clipboard