Run Migrations. Added player field to script model in order to allow Players to be scripted in the same way Objects can.

This commit is contained in:
Griatch 2014-02-23 22:59:08 +01:00
parent 75ef743297
commit 8b52591c2f
5 changed files with 137 additions and 7 deletions

View file

@ -822,9 +822,10 @@ class CmdIRC2Chan(MuxCommand):
self.msg(string)
return
botname = "ircbot-%s" % irc_botname
if('disconnect' in self.switches or 'remove' in self.switches or
'delete' in self.switches):
botname = "ircbot-%s" % irc_botname
matches = PlayerDB.filter(db_isbot=True, db_key=botname)
if matches:
matches[0].delete()
@ -834,7 +835,7 @@ class CmdIRC2Chan(MuxCommand):
return
# create a new bot
bot = create.create_player(bots.IRCBot, key=botname)
bot = create.create_player(botname, None, None, typeclass=bots.IRCBot)
bot.start(ev_channel=channel, irc_botname=irc_botname, irc_channel=irc_channel,
irc_network=irc_network, irc_port=irc_port)
self.msg("Connection created. Starting IRC bot.")