mirror of
https://github.com/evennia/evennia.git
synced 2026-04-04 23:17:17 +02:00
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:
parent
a10df7ec6b
commit
0e9732d49c
17 changed files with 535 additions and 527 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue