Receiving data event

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

Receiving data event

Post by azuriolinist » Tue Nov 10, 2015 1:58 pm

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#2283

Re: Receiving data event

Post by Belgarath » Tue Nov 10, 2015 6:24 pm

Which data? Text? GMCP?

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

Re: Receiving data event

Post by azuriolinist » Wed Nov 11, 2015 3:05 am

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

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

Re: Receiving data event

Post by Belgarath » Thu Nov 12, 2015 1:18 am

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: 920
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Receiving data event

Post by SlySven » Fri Nov 13, 2015 7:50 pm

@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 » Sat Nov 14, 2015 3:13 am

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: 920
Joined: Mon Mar 04, 2013 3:40 pm
Location: Deepest Wiltshire, UK
Discord: SlySven#2703

Re: Receiving data event

Post by SlySven » Sun Nov 15, 2015 1:22 pm

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

Who is online

Users browsing this forum: No registered users and 7 guests