What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » anti flood to my script

anti flood to my script
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: anti flood to my script
Taking it one step further, making it work on a per contact basis...

js code:
var oContacts = {};

function OnEvent_ChatWndReceiveMessage(ChatWnd, Message, Origin, MsgKind)
{
    if (Message === "-comandtest" && (oContacts[Origin].AllowCmd || typeof oContacts[Origin] === 'undefined'))
    {
        ChatWnd.SendMessage("Command successful!"); // or whatever you want to send
        oContacts[Origin].AllowCmd = false;
        MsgPlus.AddTimer(Origin, 10000)
    }
}

function OnEvent_Timer(TimerId)
{
        oContacts[TimerId].AllowCmd =  true;
}

This post was edited on 11-26-2011 at 12:27 PM by matty.
11-26-2011 12:25 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
anti flood to my script - by Damire on 11-19-2011 at 02:01 AM
RE: anti flood to my script - by whiz on 11-25-2011 at 10:37 PM
RE: anti flood to my script - by matty on 11-26-2011 at 12:25 PM
RE: anti flood to my script - by Spunky on 11-26-2011 at 03:42 PM
RE: anti flood to my script - by matty on 11-27-2011 at 01:08 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On