mIRC Home    About    Download    Register    News    Help

Active Threads | Unanswered Past 24 hours | Past 48 hours | Past Week | Past Month | Past Year
Scripts & Popups Jump to new posts
Re: Request ban script particular... Epic Yesterday at 09:00 PM
At your request in personal correspondence made several changes and improvements in the script. Please tested the script before using it.

Allow Chars v1.1 – updates:

  1.Now instead of setting through an alias "allowchars_set" you can customize the script through the channel Menu or the bar Menu, by right-clicking. (All missing variables will be set by default).
  2.Now messages will be checked through regular expressions, instead of loops (while), which in the past could lead to a slowdown in the script with a large number of messages. (Thanks "maroon").
  3.Now in the variable "%ach_btype" you can specify several values of the ban type at once separated by commas (to install several bans at once on the intruder) or leave only one number. Default: <2,3>.
  4.Now instead of the variable "%ach_characters" will be used the variable "%ach_charfile" to specify the full path to the text file, where you can write all the characters allowed. (Within reasonable limits).


An example of how can be filled the file "allowchars.txt" which was specified in the variable "%ach_charfile":
Code
abcdefghijklmnopqrstuvwxyz
абвгдеёжзийклмнопрстуфхцчшщъыьэюя
0123456789^`'"*#№@%$&(){}[]|\/<>:;!?+=-~,._
😀😉😁😆😅😂🤣😊🙂😄🙃😇😃😚🥰😙☺😍😗🥲😘🤩😋😛😜🤪😝🤑🤔🤭🤗🤫😐😶😶😬😏😑😒🙄🤐🤥😌😔😪😴🤤🥶🤧
😷🤯🥴😵🤒🥵🤮🤕🤢🥸🤠🥳🤓😎🧐😕😖😧🥺😫😱😞😯😮😭😟😓😩😢😲😨🥱😳🙁😥😣😦☹😰☠😤😈😡💀👿🤬😠
💩🤡🤖👽👾👻👺👹🙀😽😸😿😾😻😺😼😹🙉🙊🙈


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 replace with this code the old code, then save it under the name "AllowChars.mrc":

Code
#####################################################################
#   Name: Allow Chars v1.1
#   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 {
  if (!%ach_work) %ach_work = yes
  if (!%ach_kick) %ach_kick = yes
  if (!%ach_ban) %ach_ban = yes
  if (!%ach_reason) %ach_reason = There are forbidden characters in your message!
  if (!%ach_btype) %ach_btype = 2,3
  if (!%ach_btime) %ach_btime = 30
  if (!%ach_exceptpref) %ach_exceptpref = [+%@&~!]
  if (!%ach_charfile) %ach_charfile = scripts\AllowСhars\allowchars.txt
}
menu menubar,status,channel {
  Allow Chars
  .Work
  ..Enable: %ach_work = yes | .echo -a "Allow Chars" - Script:03 enabled.
  ..Disable: %ach_work = no | .echo -a "Allow Chars" - Script:04 disabled.
  .Characters
  ..File: allowchars_set | .run %ach_charfile
  ..Path: var %p $$?="Enter the full path to the file with allowed characters:" | if ($len(%p) > 0) { %ach_charfile = %p | .echo -a "Allow Chars" - The path to the file:03 %ach_charfile }
  .Kick
  ..Enable: %ach_kick = yes | .echo -a "Allow Chars" - Kick:03 enabled.
  ..Disable: %ach_kick = no | .echo -a "Allow Chars" - Kick:04 disabled.
  ..-
  ..Reason: var %r $$?="Enter the reason for the kick:" | if ($len(%r) > 0) { %ach_reason = %r | .echo -a "Allow Chars" - Kick reason:03 %ach_reason }
  .Ban
  ..Enable: %ach_ban = yes | .echo -a "Allow Chars" - Ban:03 enabled.
  ..Disable: %ach_ban = no | .echo -a "Allow Chars" - Ban:04 disabled.
  ..-
  ..Type: var %t $$?="Enter one or more types of bans separated by commas:" | if ($len(%t) > 0) { %ach_btype = %t | .echo -a "Allow Chars" - Ban type:03 %ach_btype }
  ..Time: var %t $$?="Enter the number of seconds after which you want to remove the ban:" | if ($len(%t) > 0) { %ach_btime = %t | .echo -a "Allow Chars" - Ban time:03 %ach_btime }
  .Except: var %p $$?="Enter the prefixes of the channel operators to exclude:" | if ($len(%p) > 0) { %ach_exceptpref = $+([,$remove(%p,]),]) | .echo -a "Allow Chars" - Except prefix:03 %ach_exceptpref }
}
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($3-,$chr(32))
    if ($exists(%ach_charfile)) {
      var %c 1 | while (%c <= $lines(%ach_charfile)) { %chars = $+(%chars,$read(%ach_charfile,n,%c)) | inc %c }
      var %pattern $+(/[^,$replacecs(%chars,\,\\,[,\[,],\],-,\-,^,\^),]/iuS) | unset %chars
      if ($regex(%text,%pattern) > 0) allowchars_ban $1 $2
    }
  }
}
alias -l allowchars_ban {
  if (%ach_ban == yes) {
    if (!%ach_btype) %ach_btype = 2 | if (%ach_btime > 0) var %ach_key $+(-u,%ach_btime)
    var %i 1 | while (%i <= $numtok(%ach_btype,44)) { .ban %ach_key $2 $1 $gettok(%ach_btype,%i,44) | inc %i }
  }
  if (%ach_kick == yes) {
    if ($len(%ach_reason) > 1) var %ach_kr %ach_reason | else var %ach_kr -
    .kick $2 $1 %ach_kr
  }
}


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.
5 267 Read More
Bug Reports Jump to new posts
Re: Timers don't trigger if scrolling custom dialog Khaled Yesterday at 11:17 AM
When I test this here, if my mouse wheel scrolls one click, the listbox scrolls by three lines, which is the system setting. The timer pauses visibly until the listbox scrolling completes and then continues. mIRC does not handle the mouse wheel messages in this case or the scrolling of the listbox - this is handled by the mouse driver which sends scroll messages to the control directly.
4 138 Read More
Bug Reports Jump to new posts
Re: /raw changes/breaks my message Raccoon Yesterday at 08:15 AM
I don't have a snap judgement on whether or not /raw should be adding tags or not, but.

In the mean time, you can use the /parseline command which sends out /raw messages at the sub-protocol level, and mIRC won't tinker with them.

/parseline -otqnu1 @+test=foo PRIVMSG #test :test

/alias /paw .parseline -otqnu1 $$1-
/paw @+test=foo PRIVMSG #test :test
1 48 Read More
Feature Suggestions Jump to new posts
How about some dialog control extensions? _entropy 25/10/21 11:37 PM
It would be NICE if mIRC used the DCX script! Full of dialog coding and a stuff! It wouldn't be that difficult i think?

Also, would be nice to have syntax highlighting in the mIRC script editor!
0 39 Read More