Paging once again can be used without a target when LASTPAGED is present.
This commit is contained in:
parent
21e4df0c91
commit
d0c6723928
1 changed files with 13 additions and 7 deletions
|
|
@ -45,10 +45,12 @@ def cmd_page(command):
|
||||||
session.msg("You last paged: %s." % (
|
session.msg("You last paged: %s." % (
|
||||||
', '.join([x.name for x in last_paged_objects])))
|
', '.join([x.name for x in last_paged_objects])))
|
||||||
return
|
return
|
||||||
session.msg("You have not paged anyone.")
|
else:
|
||||||
return
|
# No valid LASTPAGE values
|
||||||
|
session.msg("You have not paged anyone.")
|
||||||
|
return
|
||||||
|
|
||||||
args = command.command_argument.split()
|
# Stores a list of targets
|
||||||
targets = []
|
targets = []
|
||||||
|
|
||||||
# Build a list of targets
|
# Build a list of targets
|
||||||
|
|
@ -64,25 +66,29 @@ def cmd_page(command):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
# For each of the targets listed, grab their objects and append
|
# For each of the targets listed, grab their objects and append
|
||||||
# it to the targets list
|
# it to the targets list if valid.
|
||||||
for target in cmd_targets:
|
for target in cmd_targets:
|
||||||
matched_object = Object.objects.local_and_global_search(pobject,
|
matched_object = Object.objects.local_and_global_search(pobject,
|
||||||
target,
|
target,
|
||||||
limit_types=[defines_global.OTYPE_PLAYER])
|
limit_types=[defines_global.OTYPE_PLAYER])
|
||||||
|
|
||||||
if matched_object:
|
if matched_object:
|
||||||
|
# Found a good object, store it
|
||||||
targets.append(matched_object[0])
|
targets.append(matched_object[0])
|
||||||
else:
|
else:
|
||||||
# search returned None
|
# Search returned None
|
||||||
session.msg("Player '%s' can not be found." % (
|
session.msg("Player '%s' can not be found." % (
|
||||||
target))
|
target))
|
||||||
|
|
||||||
# Depending on the argument provided, either send the entire thing as
|
# Depending on the argument provided, either send the entire thing as
|
||||||
# a message or break off the point after the equal sign.
|
# a message or break off the point after the equal sign.
|
||||||
if command.arg_has_target():
|
if command.arg_has_target():
|
||||||
|
# User specified targets, get the stuff after the equal sign.
|
||||||
message = command.get_arg_target_value()
|
message = command.get_arg_target_value()
|
||||||
else:
|
else:
|
||||||
session.msg("Page them what?")
|
# No targets specified with equal sign, use lastpaged and the user's
|
||||||
return
|
# arguments as the message to send.
|
||||||
|
message = command.command_argument
|
||||||
|
|
||||||
sender_name = pobject.get_name(show_dbref=False)
|
sender_name = pobject.get_name(show_dbref=False)
|
||||||
# Build our messages
|
# Build our messages
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue