this silly storytelling game has been lightly tested, but it appears to
not blow up miserably, so i'm going to commit it until i can spend more
time testing it/caring about it
decouple the dispatcher (a key, basically) with the actions to take upon
receiving such a message. allows us to have multiple actions for one key
without weird hacks
use GenericAPIView rather than APIView in order to get some common idiom
stuff done for us. we continue to support GET and POST in
DispatchMessage, now it's just a bit cleaner. i think.
anyway if we were doing this stuff more we could/should probably create
mixins for them, but at the moment this is pretty sane i think
this moves the dispatcher functionality that used to be in the old
ircbot directly to django REST framework, which is more robust and
allows for cooler stuff down the road. this still retains the ability to
have the bot privmsg, that still happens over the XML-RPC interface,
this is just a more convenient frontend to that
this allows plugins to register methods that can be called over XML-RPC
the old bot used this interface behind apache for a web service, but i
think in this version it will only be for django -> ircbot, and django
will have a rest API for other things
some ircds don't lead to a welcome signal, so our attempts to set the
nickmask there may never happen. guess at one first, in the event that
_on_welcome() never fires
this is a djangoification of the old (really old, actually) karma stuff
written by mike bloy. functionality should be the same, and might be a
bit faster through the ORM now
for convenience, pass a list of events to add_global_regex_handler if
you want to have multiple things fire the same handler. common case is
pubmsg and privmsg