move IRC server settings to database
this is the first step in trying to get the bot to support multiple servers with different channels, countdown triggers, and so on this also ends up affecting some configuration around: * dispatch * markov * admin privmsg form
This commit is contained in:
@@ -17,8 +17,13 @@ class Command(BaseCommand):
|
||||
|
||||
help = "Start the IRC bot"
|
||||
|
||||
def add_arguments(self, parser):
|
||||
"""Add arguments to the bot startup."""
|
||||
parser.add_argument('server_name')
|
||||
|
||||
def handle(self, *args, **options):
|
||||
"""Start the IRC bot and spin forever."""
|
||||
irc = IRCBot()
|
||||
self.stdout.write(self.style.NOTICE(f"Starting up {options['server_name']} bot"))
|
||||
irc = IRCBot(options['server_name'])
|
||||
signal.signal(signal.SIGINT, irc.sigint_handler)
|
||||
irc.start()
|
||||
|
||||
Reference in New Issue
Block a user