$ischanmode

By sunburst on Dec 25, 2007

Returns $true or $false depending on if a channel mode is set. See documentation below. Ability to use wildcards and to match multiple modes at a time. Very simplified code.

Comments

Sign in to comment.
dashh   -  Feb 21, 2009

-> $poscs($chan($1).mode,$2)

more chars ?

U can use $numtok 32 in $2($2-) to search a string like -> #room n t l
and pos target whit gettok.

$str(lastid,$numtok($2-))

done xD but nice work with regex.

 Respond  
Thorarin   -  Feb 20, 2009

The snippet works alright after fixing some of the whitespace that tends to mess up mIRC scripts.. there's just one thing: you should be using $wildtokcs instead of $wildtok. A channel flag "c" is different than "C" for example.

 Respond  
sunburst   -  Dec 25, 2007

Ah, I knew this would come up. That would work, but this is better because it supports wildcards. If the modes were +ist, $ischanmode(#,it) would not work. However, $ischanmode(#,i*t) would work. Just makes it easier to return matches.

 Respond  
Lindrian   -  Dec 25, 2007
alias ischanmode return $iif($2 isincs $chan($1).mode,$true,$false)

That\'d do I think.

 Respond  
sunburst   -  Dec 25, 2007

Yes I know it is simple, but, as stated in the documentation, I found it very useful and thought I\'d share it with others. Thanks for your rating though!

 Respond  
Rebellious   -  Dec 25, 2007

.. Very simple =(

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.