PDA

View Full Version : Handler questions



Bidmaron
December 27th, 2010, 17:19
1) slash commands can only be typed in the chat entry line, not injected programmatically using deliverMessage, right?
2) if I want to intercept chat messages to implement a messaging system between code on host and clients, if I use the onReceiveMessage event, I presume that my code would be called after the chatmanager stuff. That is, chatmanager would siphon off any slash commands before I get a chance to see the message (this is what I want, actually). Of course, if I didn't I could patch out the chatmanager code, but I am content with seeing the data after chatmanager. Thus, in my code, if I determined that the message is something I want to act upon (e.g. a 'backslash' command handler), I could use the data and return false to prevent the data from showing up in the chat window.

Bidmaron
December 31st, 2010, 12:29
I can eventually figure this out by sifting through the chatmanager (and associated) code. Just thought someone familiar might know the answer off the top of their head before I embark on this great adventure.

Moon Wizard
January 5th, 2011, 20:23
1) Slash commands can only be executed locally. They are only triggered when a user presses enter in the chat entry box, and when a hot key is depressed with text that starts with a slash.

2) I'm adding a message passing system in the next release v2.8. The functions will be Comm.deliverOOBMessage (table (string -> string), recipient(s)) and the handler registration will be Comm.onReceiveOOBMessage (table (string -> string)). I am re-implementing the 4E message passing system I created in the new 3.5E ruleset with the new functions to make sure they are sounded out.

Regards,
JPG

Bidmaron
January 8th, 2011, 08:45
Thanks, jpg.