* using Plugin.GenServer now uses Plugin.Base so that is not required
* Remove Omnibot.Plugin because all it did was include Plugin.GenServer
and Plugin.Base
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Both markov and wordbot have some auxiliary processes that run to keep
track of things. Previously, they both had custom supervisors grafted on
to the Plugin.Base - now, this grafting is automated with
Plugin.Supervisor.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Being able to handle arbitrary messages from other processes is a
generally useful thing to have for fine-grained control of the plugin.
Agents don't provide that, while GenServers do. I've removed all
instances of the Agent and replaced it with the GenServer and everything
appears fine so far.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
Since route_msg expects msg.prefix to be present, every plugin that
calls route_msg when no prefix is specified in the message (e.g. with
PING messages) would cause a crash of the process.
Now, it just calls a no-op function, since all behavior covered by
route_message requires information in the prefix at some point.
Signed-off-by: Alek Ratzloff <alekratz@gmail.com>