Big re-organization of command functions. Introduced the commands directory to hold command modules. This will make it easier to sub-divide stuff as we pile on more commands, and for dropping in new optional command modules.

This commit is contained in:
Greg Taylor 2007-05-29 03:32:48 +00:00
parent a10df7ec6b
commit 0e9732d49c
17 changed files with 535 additions and 527 deletions

View file

@ -6,7 +6,6 @@ from twisted.conch.telnet import StatefulTelnetProtocol
import cmdhandler
from apps.objects.models import Object
from django.contrib.auth.models import User
import commands_general
import functions_db
import functions_general
import session_mgr
@ -82,6 +81,12 @@ class SessionProtocol(StatefulTelnetProtocol):
# Stuff anything we need to pass in this dictionary.
cdat = {"server": self.factory.server, "uinput": uinput, "session": self}
cmdhandler.handle(cdat)
def execute_cmd(self, cmdstr):
"""
Executes a command as this session.
"""
self.lineReceived(data=cmdstr)
def handle_close(self):
"""