Channel List Info with Mode Definitions
Platform: mIRC
Published Jul 27, 2010
Updated Jul 31, 2010
This is a forum request asked by the user Cheiron. He encourages me that I post this as a public snippet submission so it can reach to other users who find it useful.
Syntax:
You can add more modes that aren't covered in the script, along with any edit of the defintions that you think suits your liking. Feedback and suggestions are welcome so this script can furthter be refined and improved.
Finally, I would like to give credit to RusselB who contributed his assistance with the while loop part of this script.
-EDIT- Took FordLawnMower's suggestion of adding a trap. I've added gooshie's version of this script so people can choose which one they wish to use.
on *:start:{ makemodes }
on *:connect:{ makemodes }
alias view {
$iif($group(#md) == off,.enable #md)
set -u3 %cchan #
list $$1
}
#md off
raw 321:*:{ haltdef }
raw 322:*:{
haltdef
msg %cchan $gettok($2-,1-3,32)
set -u3 %listmode $remove($gettok($gettok($2-,1-3,32),3-,32),+,[,])
listmode
}
raw 323:*:{
haltdef
.disable #md
window -c "Channels List"
}
#md end
on $*:text:/!display (\43\S+)/iS:#:{
if (!%f) {
inc -u3 %f
$view($regml(1))
}
}
alias -l makemodes {
if (!$hget(modes)) hmake modes 10
hadd modes A Admins only Channel:
hadd modes C No CTCPs allowed in the Channel:
hadd modes G Censor Bad Language:
hadd modes M Must be using a registered nick(+r), or have voice access to talk:
hadd modes K /KNOCK is not allowed:
hadd modes N No Nickname changes are permitted in the Channel:
hadd modes O IRC Operator only Channel (settable by IRCops):
hadd modes Q No Kicks Allowed:
hadd modes R Only registered(+r) users may join the Channel:
hadd modes S Strips mIRC color codes:
hadd modes T No NOTICEs allowed in the Channel:
hadd modes V /INVITE is not allowed:
hadd modes f Channel has flood modes applied:
hadd modes i A user must be invited to join the Channel:
hadd modes k <key> = Users must specify <key> to join:
hadd modes l <number of max users> = Channel may hold at most <number> of users:
hadd modes p Private Channel:
hadd modes u Auditorium mode (/names and /who only show Channel OPS):
hadd modes z Only Clients on a Secure Connection (SSL) can join: $!xm(z)
}
alias -l listmode {
var %a = 1, %b = $len(%listmode)
while %a <= %b {
var %mode = $mid(%listmode,%a,1)
if %mode === s { .msg %cchan $v1 - Secret Channel: }
elseif %mode === t { .msg %cchan $v1 - Only Ops set topic: }
elseif %mode === c { .msg %cchan $v1 - Block messages containing mIRC color codes: }
elseif %mode === m { .msg %cchan $v1 - Moderated Channel(only +vhoaq users may speak): }
elseif %mode === r { .msg %cchan $v1 - The Channel is registered (settable by Services only): }
elseif %mode === n { .msg %cchan $v1 - Users outside the Channel can not send PRIVMSGs to the Channel: }
elseif $hget(modes,%mode) { .msg %cchan %mode - $v1 }
else { .msg %cchan the mode $+(",%mode,") does not exist! }
inc %a
}
}
********************* goooshie's version *********************
on $*:text:/!display (\43\S+)/iS:#:{
if !%f {
inc -u3 %f
set -u3 %cchan #
list $regml(1)
}
}
raw 321:*:if %cchan { haltdef }
raw 323:*:if %cchan { haltdef | window -c "Channels List" }
raw 322:*:{
if %cchan {
var %m $remove($gettok($gettok($2-,1-3,32),3-,32),+,[,])
msg %cchan $gettok($2-,1-3,32)
var %a 0,%b $len(%m)
while %a < %b {
inc %a
.msg %cchan $iif($listmode($mid(%m,%a,1)),$v1,$mid(%m,%a,1) * No mode definition)
}
}
}
alias listmode {
goto $asc($1)
:65 | return A - Admins only Channel
:67 | return C - No CTCPs allowed in the Channel
:71 | return G - Censor Bad Language
:75 | return K - /KNOCK is not allowed
:77 | return M - Must be using a registered nick(+r), or have voice access to talk
:78 | return N - No Nickname changes are permitted in the Channel
:79 | return O - IRC Operator only Channel (settable by IRCops)
:81 | return Q - No Kicks Allowed
:82 | return R - Only registered(+r) users may join the Channel
:83 | return S - Strips mIRC color codes
:84 | return T - No NOTICEs allowed in the Channel
:86 | return V - /INVITE is not allowed
:99 | return c - Block messages containing mIRC color codes
:102 | return f - Channel has flood modes applied
:105 | return i - A user must be invited to join the Channel
:107 | return k - <key> = Users must specify <key> to join
:108 | return l - <number of max users> = Channel may hold at most <number> of users
:109 | return m - Moderated Channel(only +vhoaq users may speak)
:110 | return n - Users outside the Channel can not send PRIVMSGs to the Channel
:112 | return p - Private Channel
:114 | return r - The Channel is registered (settable by Services only)
:116 | return t - Only Ops set topic
:117 | return u - Auditorium mode (/names and /who only show Channel OPS)
:122 | return z - Only Clients on a Secure Connection (SSL) can join
:error | reseterror
}