Commit Graph

11 Commits

Author SHA1 Message Date
accfc2a7fe Remove old TODO
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-08-11 15:43:43 -07:00
2f378dd438 Finish removing Omnibot.State functions
Omnibot.State shouldn't be used anywhere anymore except as a GenServer
being started up in the supervisor.

Also, configuration must be loaded through Config.load/1 rather than
being constructed, because everything expects a tuple of {plugin,
config} now.

Finally, Omnibot.Core must be added to the configuration in order for
basic functionality.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-08-11 15:23:53 -07:00
715480230a Remove Omnibot.State.cfg/0 from Omnibot.Irc module
Deprecating Omnibot.State: IRC module holds its own configuration now.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-08-11 12:48:28 -07:00
ec1dd42ca1 Fix routing bug in IRC and base plugin
Previously, messages were only routed from IRC if they were *not* for
the current user. This should only be happening for privmsg messages,
since a plugin is generally aware of what it's sending out.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-18 14:09:17 -07:00
d2a1cb541d Change message routing logic to be an implication instead of AND
Previously, a message wouldn't be admitted if it didn't have a prefix,
(logical) AND if the message was equal to the bot's nickname.

Now, a message with a blank prefix passes through, but if the prefix is
the bot's nickname, it does not.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-17 22:14:40 -07:00
b72071793b Remove unnecessary kruft
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-17 22:14:33 -07:00
bb8ebca0b8 IRC messages are not routed if they are sent by the bot
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-16 18:00:43 -07:00
9679c46e15 WIP: Supervisor-based plugin base
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-12 12:19:14 -07:00
96c5ed78cf Rename lib/irc.ex -> lib/irc/irc.ex
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-07-02 18:49:48 -07:00
73c5f58243 WIP: Move to using modules for implementing core behavior
Since modules can now intercept all messages in the channels they're
listening for, it'd be cool to have modules handling things like making
sure the Omnibot.State stays updated as appropriate, and that pings are
ponged, etc.

This will probably deprecate the router, since it's been reduced to a
single function call, but we'll see about that.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-13 16:04:19 -04:00
6340936895 Initial commit with IRC and bot example.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
2020-06-12 17:29:35 -04:00