Code snippet for the "Popups" menu:
Code
Punishment
.Ban+Kick : mode $chan +bb $address($$1,2) $address($$1,3) | kick $chan $$1 You are not welcome here!
.-
.Ban $chr(9) *!*@host : ban $chan $$1 2
.Ban $chr(9) $+(R,$chr(58),<account>) : bacc $chan $$1
.-
.Ban $chr(9) Combo : set %bcombo $true | bacc $chan $$1
.Ban+Kick $chr(9) Combo : set %bcombo $true | bacc $chan $$1 | kick $chan $$1 You are not welcome here!


Code snippet with the "ON INPUT" event handler:
Code
on @*:INPUT:#:{
  if (!q == $1) {
    if ($2 == $null) { msg chanserv owner $chan $me } | else { mode $chan +q $2- }
  }
  if (!a == $1) {
    if ($2 == $null) { msg chanserv protect $chan $me } | else { mode $chan +aaaaaaaaaa $2- }
  }
  if (!o == $1) {
    if ($2 == $null) { msg chanserv op $chan $me } | else { mode $chan +oooooooooo $2- }
  }
  if (!kb == $1) { ban -k $chan $2 2 You are not welcome here! }
  if (!k == $1) { kick $chan $2 $3- }
  if (.k == $1) { kick $chan $2 $3- }
  if (!b == $1 ) { mode $chan +b $+(*,$2,*!*@*) }
  if (.b == $1 ) { ban $chan $2 $3- }
  if (!br == $1) { bacc $chan $2 }
  if (!kbr == $1) { bacc $chan $2 | kick $chan $2 You are not welcome here! }
  halt
}


Code snippet (badwords) with the "ON TEXT" event handler:
Code
on @*:TEXT:*this one*:#Mairel: ban $chan $nick 2
on @*:TEXT:*this too*:#Mairel: ban $chan $nick 2
on @*:TEXT:*i want combo ban*:#Mairel: set %bcombo $true | bacc $chan $nick


alias bacc { .enable #islogged | set %bchan $1 | whois $2 }
alias setmode { $iif(%bcombo,mode %bchan +bb $address($1,2) $+(R:,$2),mode %bchan +b $+(R:,$2)) | unset %bchan %bcombo }

#islogged off
raw *:*is logged*: setmode $2 $3
raw 318:*: .disable #islogged
#islogged end


P.S. Please note that I have made many changes to fix bugs and improve things. You can compare your old code with this update to see what you were doing wrong. Also, never forget to look at the help documentation to see the correct syntax and read information about how to use a particular code element: https://en.wikichip.org/wiki/mirc


🌐 https://forum.epicnet.ru 📜 irc.epicnet.ru 6667 #Code | mIRC scripts, help, discuss, examples