Page 1 of 1

Receiving data event

Posted: Tue Nov 10, 2015 1:58 pm
by azuriolinist
I was wondering if Mudlet triggered an event when data comes in from the MUD, and if so what the name of that event is? I'm trying to script up some notification system but I can't find the sort of event I'm looking for on the wiki.

Re: Receiving data event

Posted: Tue Nov 10, 2015 6:24 pm
by Belgarath
Which data? Text? GMCP?

Re: Receiving data event

Posted: Wed Nov 11, 2015 3:05 am
by azuriolinist
Belgarath wrote:Which data? Text? GMCP?
Text data.

Re: Receiving data event

Posted: Thu Nov 12, 2015 1:18 am
by Belgarath
There aren't any events triggered on receiving text (that I'm aware of) unless it is raised yourself via the raiseEvent function.

Re: Receiving data event

Posted: Fri Nov 13, 2015 7:50 pm
by SlySven
@Belgorath Humm, *scratches head in thought as he tries to think back* ah, yes, here it was - I'd suggested to the OP that a trigger that responded to ANY incoming text (perhaps with a regexp of the form ^(.+)$ {I think}) which fires on anything that isn't a blank line and then use the script with that to do the lua raiseEvent() command... is that what you mean?

Re: Receiving data event

Posted: Sat Nov 14, 2015 3:13 am
by azuriolinist
SlySven wrote:@Belgorath Humm, *scratches head in thought as he tries to think back* ah, yes, here it was - I'd suggested to the OP that a trigger that responded to ANY incoming text (perhaps with a regexp of the form ^(.+)$ {I think}) which fires on anything that isn't a blank line and then use the script with that to do the lua raiseEvent() command... is that what you mean?
This makes it raise an event for every new line, though, but thanks!

Re: Receiving data event

Posted: Sun Nov 15, 2015 1:22 pm
by SlySven
Well, yes, that what it is supposed to do - a low-level (simple, quick) "interrupt" - your event handler will then decide what to do with that information - if anything! :geek: