Addition of a player_search() function in functions_db. This first searches for alias matches (exact, no case-sensitivity). If it finds none, it does a normal local_and_global_search() limited by object type PLAYER. Also did some more code cleanup and commenting.

This commit is contained in:
Greg Taylor 2007-04-30 14:21:48 +00:00
parent 6d52103359
commit 98e9175582
4 changed files with 112 additions and 49 deletions

View file

@ -1,3 +1,4 @@
from traceback import format_exc
import commands_privileged
import commands_general
import commands_unloggedin
@ -67,7 +68,10 @@ def handle(cdat):
if callable(cmd):
cdat['uinput'] = parsed_input
cmd(cdat)
try:
cmd(cdat)
except:
session.msg("Untrapped error: %s" % (format_exc(),))
return
if session.logged_in: