Receiving data event

Post Reply
azuriolinist
Posts: 6
Joined: Tue Sep 01, 2015 4:01 am

Receiving data event

Post 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.

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Receiving data event

Post by Belgarath »

Which data? Text? GMCP?

azuriolinist
Posts: 6
Joined: Tue Sep 01, 2015 4:01 am

Re: Receiving data event

Post by azuriolinist »

Belgarath wrote:Which data? Text? GMCP?
Text data.

User avatar
Belgarath
Posts: 232
Joined: Fri Jul 26, 2013 7:19 am
Discord: macjabeth#7149

Re: Receiving data event

Post 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.

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Receiving data event

Post 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?

azuriolinist
Posts: 6
Joined: Tue Sep 01, 2015 4:01 am

Re: Receiving data event

Post 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!

User avatar
SlySven
Posts: 1019
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Receiving data event

Post 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:

Post Reply