mIRC Home    About    Download    Register    News    Help

Print Thread
#247316 28/07/14 02:27 PM
Joined: Mar 2014
Posts: 65
E
Exuviax Offline OP
Babel fish
OP Offline
Babel fish
E
Joined: Mar 2014
Posts: 65
So this is my current script

Code:


ON @*:TEXT:*:#:{
  if ($nick == JTV) { RETURN }
  if ($read(subscribers.txt,nw,$nick)) { return }
  if ($($+(%,reg.,$chan,.,$nick),2)) { RETURN }
  if ($($+(%,permit.,$nick),2)) { RETURN }
  IF ($nick isop #) { RETURN }
  if ($($+(%,spam1.,$nick),2)) { RETURN }
  var %regex =  /(\!){10,}|(\&#10084;){4,}|(\-){5,}|(\<3){5,}|(\@){10,}|(\#){5,}|(\$){6,}|(\%){5,}|(\^){5,}|(\&){3,}|(\(){4,}|(\-){5,}|(\_){6,}|(\=){5,}|(\+){5,}|(\,){5,}|(\.){10,}|(\<){5,}|(\>){5,}|(\/){3,}|(\?){8,}|(\;){4,}|(\:){5,}|(\’){5,}|(\”){5,}|(\[){5,}|(\{){5,}|(\]){5,}|(\\){5,}|(\|){5,}|(\~){5,}|(\`){5,}|(\&#9617;){1,}|(\&#7431;){1,}|(\&#7439;){1,}|(\&#7424;){1,}|(\&#618;){1,}|(\&#7452;){1,}|(\&#65313;){1,}|(\&#65317;){1,}|(\&#65327;){1,}|(\&#65321;){1,}|(\&#65333;){1,}|(\&#3655;){1,}/Sig
  if ($regex($1-,%regex)) {
    if ($($+(%,spamsym.,$nick),2)) {
        .timer[sym1] 1 1 msg # .timeout $nick 560
        msg # $nick --> How about you don't do that. No posting mass symbol messages. (Timeout)
        unset %spamsym. $+ $nick On
        write timed_out.txt Symbol Spam: $nick $+ : $1-
    }
  }
}



On here, you will see that it just kinda looks for certain things and removes them. The problem is, we are getting more and more spam that I can't put in my script because things like this heart &#10084; show up as a Square



Is their a way to have more symbols show up in the script, or have them offloaded into a Text File, but still have as many options as I do above. So, with this &#10084; heart, I allow the users to type it in up to 4 times before the script will time them out, and yet in the same line they can post the @ symbol 10 times before getting timed out. Am I able to offload this amount of precision into a text file? Or just have a way to turn on Unicode? (Or like Java, where I can import the script)



I do things with stuff that makes other things do stuff.
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
Are you using mIRC 7.x version?

The square character is not important, it means that the current font you are using to render a character does not have that character, something called font linking is a process that is applied in this case where it will try to find the character in another font on your system, the problem is that fonts will yield they have the character when they don't, well, they have the square for that character.

I understand the square is making the regular expression a bit harder to follow but the character is there, the regular expression will work.
You can workaround this easily, you can use a comment inside the regular expression, you can put a comment in your code with the corresponding glyph like &#10084 is a heart etc. eventually you would need to change your font to hope to be able to see more characters. You are already using a text file for your script file, I'm not sure why using another file would help here.




#mircscripting @ irc.swiftirc.net == the best mIRC help channel

Link Copied to Clipboard