Receiving data event
-
- Posts: 6
- Joined: Tue Sep 01, 2015 4:01 am
Receiving data event
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
Which data? Text? GMCP?
-
- Posts: 6
- Joined: Tue Sep 01, 2015 4:01 am
Re: Receiving data event
Text data.Belgarath wrote:Which data? Text? GMCP?
Re: Receiving data event
There aren't any events triggered on receiving text (that I'm aware of) unless it is raised yourself via the raiseEvent function.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Receiving data event
@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?
-
- Posts: 6
- Joined: Tue Sep 01, 2015 4:01 am
Re: Receiving data event
This makes it raise an event for every new line, though, but thanks!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?
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Receiving data event
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!