You can try using the script I created especially for you.

Allow Chars v1.0 – description:

  1.This script controls the use of only those characters in channel messages that are allowed and listed in the variable "%ach_characters". Otherwise, the user will receive "Kiсk+Ban".
  2.In the alias "allowchars_set" you can remake all the settings for this script by changing the values of the variables:

      %ach_work – configures the enable or disable of the script. The options are: <yes|no>.
      %ach_kick – configures whether to enable or disable execution "Kick" for the offender. The options are: <yes|no>.
      %ach_ban – configures whether to enable or disable execution "Ban" for the offender. The options are: <yes|no>.
      %ach_reason – configures the reason for the ban, which will be indicated in the kick message. (You can change this to your text).
      %ach_btype – configures the type (format) of the ban for the offender. More details about the types of bans are described here: $mask. Default: <2>.
      %ach_btime – contains the time (in seconds) for which a temporary ban will be set, and after which it will be automatically canceled on the channel. If you do not want to remove the ban, then set: <0>.
      %ach_exceptpref – contains prefixes of symbols (channel operator status) for which there will be an exception and the script will not react to these users. Default: <[!~&@%+]>. (You can change this to other prefixes).
      %ach_characters – contains all characters that are allowed for use in channel messages. (You can change or add to this set your national valid characters Unicode and Emoji).

Screenshot for demo operability of the script's:

      [Linked Image from i.ibb.co]

The script was tested on InspIRCD v3 + mIRC v7.67.

Click on the button to reveal the spoiler. This code must be inserted into the scripts editor. To do this, press the key combination "ALT+R" and save this code as new "File/New" script called "AllowChars.mrc":

Code
#####################################################################
#   Name: Allow Chars v1.0
#   Author: Epic (epicnet@mail.ru, http://epicnet.ru)
#   Description: Allows to use in channel messages only those characters that are specified in the script.
#####################################################################

alias -l allowchars_set {
  %ach_work = yes
  %ach_kick = yes
  %ach_ban = yes
  %ach_reason = There are forbidden characters in your message!
  %ach_btype = 2
  %ach_btime = 3600
  %ach_exceptpref = [!~&@%+]
  %ach_characters = [abcdefghijklmnopqrstuvwxyz0123456789^`'"*#№@%$&(){}[]|\/<>:;!?+=-~,._]
}
on *:TEXT:*:#: allowchars $nick $chan $1-
on *:ACTION:*:#: allowchars $nick $chan $1-
alias -l allowchars {
  allowchars_set | var %ach_pnick $remove($nick($2,$1).pnick,$1)
  if (%ach_work == yes && %ach_pnick !isin %ach_exceptpref) {
    var %text $remove($strip($3-),$chr(32))
    if ($checkchars(%text) == false) allowchars_ban $1 $2
  }
}
alias -l checkchars {
  var %chars $remove(%ach_characters,$left(%ach_characters,1),$right(%ach_characters,1))
  var %i 1 | while (%i <= $len($1)) { if ($mid($1,%i,1) !isin %chars) { return false | break } | inc %i } | return true
}
alias -l allowchars_ban {
  if (%ach_kick == yes) {
    if ($len(%ach_reason) > 1) var %ach_kr %ach_reason | else var %ach_kr -
    .kick $2 $1 %ach_kr
  }
  if (%ach_ban == yes) {
    if (!%ach_btype) %ach_btype = 2 | if (%ach_btime > 0) var %ach_key $+(-u,%ach_btime)
    .ban %ach_key $2 $1 %ach_btype
  }
}


Remember that if something went wrong, or you accidentally erased something, then you can always reinstall this script again.
If you find any errors in the code and in its work, or maybe you have new ideas or if you think that this script needs to be improved, then be sure to write to me here about it, and we are together think about what we can do.



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