Shoutbox

Simple Anti-Spam - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Simple Anti-Spam (/showthread.php?tid=71907)

Simple Anti-Spam by kilouco on 02-19-2007 at 04:37 AM

Hello... i was wondering if there are a way to make a script that trasnform a msg like this:

n00b says:
UAIEheoaihAEIOheauioeaHiouEAHioAEUhEAIOUheAI
OueHueioaheAIUOheIuoheAiuoeAHiuoeaheaUIOhAE
IuohAEiuoeAHiuoeAheAIOUheaIOUhEAIOuAEHioueaH
iEAUOheAIOUhEAOIUehaiuoeaHiouaEHieoaUhei

in:

n00b says:
i am stupid, and i am trying to spam you.

the script should recognize messages with more than xxx characters and transform it on a simple "i am stupid"

i need this script because spams make my msn crash...
tnx :D


RE: Simple Anti-Spam by Felu on 02-19-2007 at 05:10 AM

code:
var maxchars = 100;//Edit the maximum number of charaters here
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    if(Message.length >= maxchars)
        Message = "I am stupid, and am trying to spam you";
    return Message;
}

Not tested but should work fine :)

RE: Simple Anti-Spam by kilouco on 02-19-2007 at 05:34 AM

i'll test, very tnx


RE: Simple Anti-Spam by Matti on 02-19-2007 at 10:25 AM

Just note that if YOU send more than X characters, it'll replace your message too!

To avoid this, you should check if the Origin is your name. If it isn't, it should replace it, otherwise it should leave it. However, if you're using StuffPlug 3's chat-only name, this won't work and will also replace your message anyway. And therefore, please check out CookieRevised's reply to [Fix] Problem with OnEvent_ChatWndRecieveMessage's Origin, where CookieRevised describes how to check if you're using a chat-only name and if necessary, check your chat-only name instead of your actual name. :)


RE: Simple Anti-Spam by kilouco on 02-19-2007 at 02:04 PM

yeah, i found this bug, but I am really n00b on this.
It should be C++ xD

i made the script... but i got another problem.
how can I make a mirror of the message of the spammer?

(he get back the msg)


RE: Simple Anti-Spam by CookieRevised on 02-19-2007 at 03:03 PM

kilouco,

May I strongly note that using such a script must be done in a very carefull way...

Who says that the long message your contact is sending you is some crap text? The contact might very well enter some very senseable question or whatever to you and you wouldn't know it. And your contact wouldn't know it either.

Bottom line: this is not a solution to your problem.
The solution is a decent anti-spam script which might block your contact if he/she sends to much lines after each other in a given amount of time. That is how anti-spam work in practice.

Something like this will only get you in more trouble, it will not solve your crashing problem (since Messenger still recieves the long messages anyways internally) and you _will_ missing probably stuff said by contacts who did not had the intention to spam you at all...

--------------------

quote:
Originally posted by Felu
code:
var maxchars = 100;//Edit the maximum number of charaters here
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MessageKind){
    if(Message.length >= maxchars)
        Message = "I am stupid, and am trying to spam you";
    return Message;
}

Not tested but should work fine :)
It will not work at all since it is far from as simple as that I'm afraid. A decent anti-spam script requires timers (individual for each contact who msgs you), should be polygamy aware, should block contacts, (automatically) unblock them, etc.