diff --git a/evennia/comms/migrations/0005_auto_20150223_1517.py b/evennia/comms/migrations/0005_auto_20150223_1517.py new file mode 100644 index 0000000000..5fcdfcd669 --- /dev/null +++ b/evennia/comms/migrations/0005_auto_20150223_1517.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations + +def convert_channelnames(apps, schema_editor): + ChannelDB = apps.get_model("comms", "ChannelDB") + for chan in ChannelDB.objects.filter(db_key="MUDinfo"): + # remove the old MUDinfo default channel + chan.delete() + for chan in ChannelDB.objects.filter(db_key__iexact="MUDconnections"): + # change the old mudconnections to MudInfo instead + chan.db_key = "MudInfo" + chan.save() + +class Migration(migrations.Migration): + + dependencies = [ + ('comms', '0004_auto_20150118_1631'), + ] + + operations = [ + migrations.RunPython(convert_channelnames), + ] diff --git a/evennia/players/players.py b/evennia/players/players.py index bd2e1e1a22..1a0ea7ddf0 100644 --- a/evennia/players/players.py +++ b/evennia/players/players.py @@ -613,7 +613,6 @@ class DefaultPlayer(PlayerDB): global _CONNECT_CHANNEL if not _CONNECT_CHANNEL: try: - print "all channels:", ChannelDB.objects.all() _CONNECT_CHANNEL = ChannelDB.objects.filter(db_key=settings.DEFAULT_CHANNELS[1]["key"])[0] except Exception: logger.log_trace() @@ -625,37 +624,6 @@ class DefaultPlayer(PlayerDB): else: logger.log_infomsg("[%s]: %s" % (now, message)) - #def _go_ic_at_login(self, sessid=None): - # new_character = self.db._last_puppet - - # # permission checks - # if self.get_puppet(sessid) == new_character: - # return - # if new_character.player: - # # may not puppet an already puppeted character - # if new_character.sessid.count() and new_character.player == self: - # # as a safeguard we allow "taking over" chars from your own sessions. - # if _MULTISESSION_MODE in (1, 3): - # txt1 = "{c%s{n{G is now shared from another of your sessions.{n" - # txt2 = "Sharing {c%s{n with another of your sessions." - # else: - # txt1 = "{c%s{n{R is now acted from another of your sessions.{n" - # txt2 = "Taking over {c%s{n from another of your sessions." - # self.unpuppet_object(new_character.sessid.get()) - # self.msg(txt1 % new_character.name, sessid=new_character.sessid.get()) - # self.msg(txt2 % new_character.name, sessid=sessid) - # elif new_character.player != self and new_character.player.is_connected: - # self.msg("{c%s{r is already acted by another player{n." % new_character.name, sessid=sessid) - # return - # if not new_character.access(self, 'puppet'): - # # main acccess check - # self.msg("{rYou may not become {C%s{n." % new_character.name, sessid=sessid) - # return - # if self.puppet_object(sessid, new_character): - # self.db._last_puppet = new_character - # else: - # self.msg("{rYou cannot become {C%s{n." % new_character.name, sessid=sessid) - def at_post_login(self, sessid=None): """ Called at the end of the login process, just before letting