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
23 lines
692 B
Python
23 lines
692 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from django.db import models, migrations
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='Dispatcher',
|
|
fields=[
|
|
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
|
|
('key', models.CharField(unique=True, max_length=16)),
|
|
('type', models.CharField(max_length=16, choices=[(b'privmsg', b'IRC privmsg'), (b'file', b'Write to file')])),
|
|
('destination', models.CharField(max_length=200)),
|
|
],
|
|
),
|
|
]
|