Skip to content

Registering the sysIrcMessage event sometimes doesn't call the associated function #3704

@jacben

Description

@jacben

Brief summary of issue:

Sometimes registerAnonymousEventHandler("sysIrcMessage", onIrcMessage) does not call the function when an IRC message is received.

Video repro here: https://youtu.be/seLTuTSOtsk (see description for timestamps)

Steps to reproduce the issue:

  1. Install oragono IRC server for Windows (https://github.com/oragono/oragono/blob/stable/docs/MANUAL.md#windows)
  2. Follow the oragono instructions to set up the server and initiate it
  3. Create a script in Mudlet with the following code:
function connectToIRC()
  setIrcServer("127.0.0.1", 6667)
  setIrcNick("Ditto")
  setIrcChannels({"#botchannel"})
  registerAnonymousEventHandler("sysIrcMessage", onIRCMessage)
  sendIrc("#botchannel", "Hello from Mudlet!")  
end

function onIRCMessage(_, sender, target, message)
  local myString = sender .. " says " .. message .. ".\n"
  feedTriggers(myString)
end
  1. Trigger connectToIRC() when the client connects to a MUD, or trigger it manually
  2. Observe that Mudlet sometimes does not echo the IRC message received upon connecting
  3. Use an external IRC client such as HexChat to send a message to the channel
  4. Observe that Mudlet sometimes does not echo the IRC message received from the user which can be seen in the Mudlet IRC client

Error output:

Connecting to an IRC server with sysIrcMessage registered, and an echo function, should echo all IRC messages

Extra information, such as Mudlet version, operating system and ideas for how to solve:

Mudlet 4.6.2
Windows 10 version 1909 build 18363.815
Restarting Mudlet eventually gets it to fire correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions