rendered paste bodyn199=alias amsg2 {
n200= if (!$1) {
n201= echo $color(other) -atg $pre /amsg2: lets you exclude channels from 'amsg'
n202= echo $color(other) -atg $pre Usage: /amsg2 setlist to view ignored channels, /amsg2 setlist <channels> to set ignored channels $par(seperated with space) $+ , /amsg2 message
n203= }
n204= elseif ($1 == setlist) && ($2) {
n205= w_ncfg amsg_ignore $2-
n206= echo $color(info) -atg $pre Channels to not msg: $2- $par($numtok($2-,32))
n207= }
n208= elseif ($1 == setlist) && (!$2) echo $color(other) -atg $pre Current channels to ignore: $iif($ncfg(amsg_ignore),$ifmatch $par($numtok($ifmatch,32)),none)
n209= else {
n210= var %i = 1, %t = $chan(0), %amsg.ignore = $ncfg(amsg_ignore), %amsg.chans
n211= while (%i <= %t) {
n212= if (!$istok(%amsg.ignore,$chan(%i),32)) {
n213= var %amsg.chans = $addtok(%amsg.chans,$chan(%i),44)
n214= echo $color(own) -qmnt $chan(%i) $replace($me.style,<mode>,$cmode($me,$chan(%i),o),<nick>,$me) $+ $1-
n215= }
n216= inc %i 1
n217= }
n218= .raw PRIVMSG %amsg.chans : $+ $1-
n219= }
n220=}