Post your buzzen code snippets here.
Get information about ircWx here
A TG007 community discussion started by err0r.
Post your buzzen code snippets here.
Get information about ircWx here
on text remote !mode command
Usage !mode <modes> <limitnum> <key>
Example !mode itumlk 100 blah
Note this is a toggle command meaning that if the mode is + it will change it to -
If current modes are + ilu and you do !mode ilut 100
the output would be -iu+tl 100
if you have l or k in the string of modes make sure you have $3 or $4 set as needed
Output for +l and k will be on a different line. The rest will be on the same line.
This is just a sample and can be improved upon. Note this will go in your on text command preferably under a userlevel or op status
if ($1 == !mode) && ($2) {
var %m 1
while ($mid($2,%m,1)) {
if ($mid($2,%m,1) isincs $chan($chan).mode) {
if ($mid($2,%m,1) == l) && ($3 isnum) { /mode $chan +l $3 }
elseif ($mid($2,%m,1) == k) && ($3) { /mode $chan -k $iif($4,$4,$3) }
else { var %modes.minus %modes.minus $+ $mid($2,%m,1) }
}
else {
if ($mid($2,%m,1) == k) && ($3) { /mode $chan +k $iif($4,$4,$3) }
else { var %modes.plus %modes.plus $+ $mid($2,%m,1) }
}
inc %m
}
mode $chan $+($iif(%modes.plus,$+(+,%modes.plus)),$iif(%modes.minus,$+(-,%modes.minus)))
}
Get information about ircWx here
Sign in to reply or start a new topic where your account has permission.