DICE PACKS BUNDLE
  1. #1

    ChatManager Handler Registration

    In my testing today with these functions, both the registerDeliverMessageCallback and registerReceiveMessageCallback do not fire when the message is hidden for GM only. I can only get them to fire if I turn on the option "Chat: Show GM rolls"

    I would like the function to be able to view the message whether or not it is set to secret.
    For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e

  2. #2
    There is nothing in the chatmanager handler registration that changes the behavior of the client nor when the events are fired; it only allows ruleset/extension code to register for the existing events (instead of overriding the chatentry/chatwindow controls).

    Secret messages are not passed to everyone, since they are not sent by the client source. If you need a "behind the scenes" behavior, you should use the OOB messaging system.

    Regards,
    JPG

  3. #3
    My extension code runs on the host side only. There is no messages being passed to clients. The extension attempts to monitor messages in the chat window, both publically viewable and if possible, also messages secret for the GM, then tests the text of the message against some pattern matching. If it matches, it triggers syrinscape to play a sound, if not it does nothing.

    Previously I used the basicchatentry override method and even overriding the Comm.deliverChatMessage functions in order to get the info. I would prefer to use the register functions if there is any way the code can see the secret messages being output to the chat on the host side.
    For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e

  4. #4
    If you look at the new chat_entry.lua script code; it simply passes the same events to the registered handlers. There is no interpretation or change in behavior.

    Regards,
    JPG

  5. #5
    I think I understand how the pieces are working. It appears that these handlers do pick up all of the messages sent via Comm.deliverChatMessage() because the chatwindow.onReceiveMessage event is being fired. However, they do not trigger on Comm.addChatMessage() calls because there is no onReceiveMessage event.

    That said, is there a way to get the message data from Comm.addChatMessage() calls?
    For support with any of my extensions, visit my #mattekure-stuff channel on Rob2e's discord https://discord.gg/rob2e

  6. #6
    No, any script-added messages have always been specifically removed from being passed and modified by additional script events. You'll have to capture at a higher level in the call chain.

    Regards,
    JPG

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
FG Spreadshirt Swag

Log in

Log in