Fix paging to take multi-word victims. Also updated messages to match MUX2.
This commit is contained in:
parent
cb05b23b5b
commit
6d52103359
1 changed files with 10 additions and 7 deletions
|
|
@ -251,10 +251,12 @@ def cmd_page(cdat):
|
||||||
session.msg("Page who/what?")
|
session.msg("Page who/what?")
|
||||||
return
|
return
|
||||||
|
|
||||||
eq_args = args[0].split('=')
|
# Combine the arguments into one string, split it by equal signs into
|
||||||
|
# victim (entry 0 in the list), and message (entry 1 and above).
|
||||||
|
eq_args = ' '.join(args).split('=')
|
||||||
if len(eq_args) > 1:
|
if len(eq_args) > 1:
|
||||||
target = functions_db.local_and_global_search(pobject, eq_args[0])
|
target = functions_db.local_and_global_search(pobject, eq_args[0])
|
||||||
message = eq_args[1:]
|
message = ' '.join(eq_args[1:])
|
||||||
|
|
||||||
if len(target) == 0:
|
if len(target) == 0:
|
||||||
session.msg("I can't find the user %s." % (eq_args[0].capitalize(),))
|
session.msg("I can't find the user %s." % (eq_args[0].capitalize(),))
|
||||||
|
|
@ -267,12 +269,13 @@ def cmd_page(cdat):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
if target[0].is_connected_plr():
|
if target[0].is_connected_plr():
|
||||||
target[0].emit_to("%s pages you with: %s" %
|
target[0].emit_to("%s pages: %s" %
|
||||||
(pobject.get_name(), ' '.join(message)))
|
(pobject.get_name(show_dbref=False), message))
|
||||||
session.msg("Page sent.")
|
session.msg("You paged %s with '%s'." %
|
||||||
|
(target[0].get_name(show_dbref=False), message))
|
||||||
else:
|
else:
|
||||||
session.msg("Player %s does not exist or is not online." %
|
session.msg("Player %s does not exist or is not online." %
|
||||||
(target[0].name.capitalize(),))
|
(target[0].get_name(show_dbref=False),))
|
||||||
except:
|
except:
|
||||||
from traceback import format_exc
|
from traceback import format_exc
|
||||||
session.msg("Untrapped error: %s" % (format_exc(),))
|
session.msg("Untrapped error: %s" % (format_exc(),))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue