Re-organization of the command handler for the sake of efficiency and cleanliness.
This commit is contained in:
parent
703fddcb7f
commit
8352c939ff
5 changed files with 256 additions and 265 deletions
|
|
@ -1,12 +1,10 @@
|
|||
from asyncore import dispatcher
|
||||
from asynchat import async_chat
|
||||
import socket, asyncore, time, sys
|
||||
from cmdhandler import *
|
||||
import cmdhandler
|
||||
from apps.objects.models import Object
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
chandler = Handler()
|
||||
|
||||
class PlayerSession(async_chat):
|
||||
"""
|
||||
This class represents a player's sesssion. From here we branch down into
|
||||
|
|
@ -53,7 +51,7 @@ class PlayerSession(async_chat):
|
|||
self.cmd_last = time.time()
|
||||
# Stuff anything we need to pass in this dictionary.
|
||||
cdat = {"server": self.server, "uinput": uinput, "session": self}
|
||||
chandler.handle(cdat)
|
||||
cmdhandler.handle(cdat)
|
||||
|
||||
def handle_close(self):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue