::: Protection ::: Control Codes

Most of us are aware of channel flooding, especially control coded text. This type of text could make IRC Client to lock-out.
Therefore, here is the script for mIRC that can prevent such text flood. Open up your mIRC and Press ALT+R or Click the Remote Icon.

on ^1:TEXT:*:#:{
 if ($nick !isreg $chan) { return }
 if ($calc($len($1-) - $len($strip($1-))) >=
49) {
  if ($me isop $chan) {
   if ($nick ison $chan) { .raw -q kick $chan $nick :Disallowed Coded Text Length }
   mode $chan +b $mask($fulladdress,
3)
  }
  haltdef | .ignore -u30 $mask($fulladdress,
3)
 }
}

on ^1:NOTICE:*:#:{
 if ($nick !isreg $chan) { return }
 if ($calc($len($1-) - $len($strip($1-))) >=
49) {
  if ($me isop $chan) {
   if ($nick ison $chan) { .raw -q kick $chan $nick :Disallowed Coded Text Length }
   mode $chan +b $mask($fulladdress,
3)
  }
  haltdef | .ignore -u30 $mask($fulladdress,
3)
 }
}

Explanation :

This script will be invoked on Channel Notice and Channel Text event. As both are same, let us pick on TEXT.

on ^1:TEXT:*:#:{
 if ($nick !isreg $chan) { return } 
; If the nick is not a regular user (op,voice,helper), it will return out off the script.
 if ($calc($len($1-) - $len($strip($1-))) >= 49) {  
; This is the parameter that check the text by minus the length of stripped text with the length of the text.
  if ($me isop $chan) {
; this line check whether you are an op of the occurrence channel
   if ($nick ison $chan) { .raw -q kick $chan $nick :Disallowed Coded Text Length } 
; if the nick is on the channel, the user will be kicked out from the channel.
   mode $chan +b $mask($fulladdress,3)
; next, banning the user on level 3.
  }
  haltdef | .ignore -u30 $mask($fulladdress,3
; out of if ...isop.. argument, the default text is halted and the user will be ignored for 30 secs.
 }
}

NB:  The underlined text can be replaced with variables or can be changed to meet the channel rules. However, I cannot guarantee this is the FASTEST scriptlet. :~~