Shoutbox

Issue with SendMessage, not working after a while. - 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: Issue with SendMessage, not working after a while. (/showthread.php?tid=92230)

Issue with SendMessage, not working after a while. by Swiftness on 09-16-2009 at 12:16 AM

Ok this script for spamming text "partially" works, but my issue is after a while (about 10-15 sends) it stops sending anything. If I send something anything manually however, it starts spamming again and still stops later. Here's the script -

code:
function OnEvent_Initialize(MessengerStart)
{
}
var toSpam = "";
var theChat;
function OnEvent_Uninitialize(MessengerExit)
{
}
function OnEvent_ChatWndSendMessage(ChatWnd, Message) {
    theChat = ChatWnd;
    Commands = Message.split(' ');
        switch (Commands[0]) {
            case "/spam" :
                toSpam = Message.substr(6);
                MsgPlus.AddTimer("asd", 200);
                return "";
                break;
            case "/stopspam" :
                MsgPlus.CancelTimer("asd");
                return "";
                break;
    }
}
function OnEvent_Timer(TimerId) {
    Debug.Trace(theChat.SendMessage(toSpam));
    MsgPlus.AddTimer("asd", 200);
}

The Debug.Trace for the SendMessage shows as true even when no message is sent. Could anyone tell me why this (no messages being sent) keeps occurring?
RE: Issue with SendMessage, not working after a while. by MeEtc on 09-16-2009 at 03:05 AM

This is a limit built into plus itself to prevent exactly what you are doing. You have to manually send a message yourself to reset the counter, and be able to use SendMessage() again. Scripts like this are extremely annoying. You wouldn't want to be the receiver of something like this, would you?