The first of many re-arrangements. Eliminated gameconf in favor of using the manager on ConfigValue. Moved some commands while I was at it. There are going to be crash bugs that need to be found and worked out.
This commit is contained in:
parent
8a1204ce76
commit
d620f3b1f0
17 changed files with 216 additions and 200 deletions
10
session.py
10
session.py
|
|
@ -7,13 +7,13 @@ from twisted.conch.telnet import StatefulTelnetProtocol
|
|||
from django.contrib.auth.models import User
|
||||
|
||||
from apps.objects.models import Object
|
||||
from apps.config.models import ConnectScreen
|
||||
from apps.config.models import ConnectScreen, ConfigValue
|
||||
import cmdhandler
|
||||
import functions_db
|
||||
import functions_general
|
||||
import functions_log
|
||||
import session_mgr
|
||||
import ansi
|
||||
import gameconf
|
||||
|
||||
class SessionProtocol(StatefulTelnetProtocol):
|
||||
"""
|
||||
|
|
@ -26,7 +26,7 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
What to do when we get a connection.
|
||||
"""
|
||||
self.prep_session()
|
||||
functions_general.log_infomsg('Connection: %s' % (self,))
|
||||
functions_log.log_infomsg('Connection: %s' % (self,))
|
||||
session_mgr.add_session(self)
|
||||
self.game_connect_screen()
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
"""
|
||||
Execute this when a client abruplty loses their connection.
|
||||
"""
|
||||
functions_general.log_infomsg('Disconnect: %s' % (self,))
|
||||
functions_log.log_infomsg('Disconnect: %s' % (self,))
|
||||
self.handle_close()
|
||||
|
||||
def load_user_channels(self):
|
||||
|
|
@ -151,7 +151,7 @@ class SessionProtocol(StatefulTelnetProtocol):
|
|||
self.msg("You are now logged in as %s." % (self.name,))
|
||||
pobject.get_location().emit_to_contents("%s has connected." % (pobject.get_name(show_dbref=False),), exclude=pobject)
|
||||
self.execute_cmd("look")
|
||||
functions_general.log_infomsg("Login: %s" % (self,))
|
||||
functions_log.log_infomsg("Login: %s" % (self,))
|
||||
|
||||
# Update their account's last login time.
|
||||
user.last_login = datetime.now()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue