Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Bug reports ➜ Duplicate world.Send's

Duplicate world.Send's

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Ked   Russia  (524 posts)  Bio
Date Fri 06 May 2005 01:57 PM (UTC)
Message
I've had this problem pop up before, but I could never link it to anything in particular. The problem is that world.Send commands seem to sometimes "breed", meaning that a single call to world.Send in a script results in more than one call seemingly happening - everything gets sent twice in a row. Now I suspect that it has something to do with an error that I seem to get every time before that starts happening.

I connect, send some commands from OnWorldConnect routine, some of them go through, and then the connection is dropped with a "Cannont decompress distance code from MUD" error message. I re-connect, the same thing happens. Finally, I realize that it must be due to one of my plugins, uninstall the plugin, and connect again. But now, after a portion of the commands in my OnWorldConnect function go through normally, the remaining two commands are repeated three times each. My suspicion is that 3 = 2 failed connections + the last successful one.

The cause of the connection error, I think, was this function in one of my plugins:


def OnPluginSend(strText):
    world.Tell(strText)
    if freeze:
        if strText.lower() in ['nw','ne','n','north','se','sw','s','south',
                               'e','w','east','west','u','p','up','down',
                               'i','o','in','out']:
            return False
        else:
            return True
    else:
        return True


And more exactly the world.Tell, I believe.
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 08 May 2005 01:24 AM (UTC)
Message
I wouldn't do that myself. The Tell puts stuff in the output buffer without a newline, and doing that in the middle of capturing data being sent out may conceivably set up some sort of strange race condition.

I would append to notepad or something like that instead.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


9,273 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.