17 Commits

Author SHA1 Message Date
Adrian Malacoda
5c87b9001a simplify Envelope type, just have event loop threads generate Events which are then wrapped by Envelopes transparently 2018-02-22 02:40:22 -06:00
Adrian Malacoda
fcc86a671e rearchitect event transmission so that the parents/children of each module are explicitly specified and we establish the linkages between them 2018-02-22 01:09:39 -06:00
Adrian Malacoda
3614c7eb5d update all dependencies to latest version. Need to wait for discord-rs to update though 2018-02-18 16:29:30 -06:00
Adrian Malacoda
495e3129d4 split logic for filtering out events into Subscription struct 2017-05-10 01:13:52 -05:00
Adrian Malacoda
7c26e0294a Add tag filters. This is a primitive way to screen out events that do not match a certain criteria (e.g. from user Dave) 2017-05-10 00:17:22 -05:00
Adrian Malacoda
2baffdacd3 implement Debug for all structs, provide implementation for message senders 2017-05-09 23:36:56 -05:00
Adrian Malacoda
e8b944b836 implement run() which just forwards to event loop 2017-05-09 22:48:04 -05:00
Adrian Malacoda
9e9da11f79 begin tenquestionmarks 0.0.2. Separate Module trait into Module struct (which holds metadata and config about the module) and EventLoop trait, which implements the event loop. The constructors still return Modules, but they are structs and not boxes. 2017-05-09 22:44:33 -05:00
Adrian Malacoda
5551ebd552 WIP for autolinker module. Currently can't use stc and tqm together because of conflicting dependencies, so this is a placeholder. 2017-02-26 17:17:22 -06:00
Adrian Malacoda
1fbba2554d replace Sender with ExtSender from transformable_channels. Now we can tag each outgoing envelope with the name of its sender 2017-02-25 21:11:25 -06:00
Adrian Malacoda
37a9645f5b Simplify module trait by combining produce/consume event methods into a single run method that runs in the module's own thread and can produce and/or consume events. Introduce an Envelope struct that encapsulates event + to/from so we can (eventually) tag every event and also limit where events are sent (e.g. you can have a specific module configured to talk or listen only to a certain other module). 2017-02-25 20:17:46 -06:00
Adrian Malacoda
442b617f31 now with amazing echobox powers 2017-02-22 23:40:30 -06:00
Adrian Malacoda
c5a88b8405 initial pvn module implementation 2017-02-19 04:49:06 -06:00
Adrian Malacoda
84d2921f8f send/receive Arc<Event> instead of Event so we don't have to clone objects all over the place. This might also enable us to be a bit more flexible with what we send with Events, and might simplify things elsewhere. 2017-02-19 02:55:30 -06:00
Adrian Malacoda
26e56ebee9 Add random response module 2017-02-16 02:00:38 -06:00
Adrian Malacoda
2c87c586e2 Remove hello module 2017-02-16 01:07:19 -06:00
Adrian Malacoda
0a51c7294f rename plugin -> module 2017-02-16 01:05:33 -06:00