Many small but useful bug fixes in various modules.

/Griatch
This commit is contained in:
Griatch 2009-10-20 20:38:24 +00:00
parent 615cb51b33
commit c4114938cc
6 changed files with 67 additions and 32 deletions

View file

@ -239,6 +239,11 @@ def cmd_clist(command):
@clist
Lists all available channels in the game.
[[clist]]
This is the same as @clist - it shows all
available channels in game.
"""
session = command.session
source_object = command.source_object
@ -260,7 +265,7 @@ def cmd_clist(command):
#s += "** End of Channel List **"
source_object.emit_to(s)
GLOBAL_CMD_TABLE.add_command("@clist", cmd_clist, help_category="Comms")
GLOBAL_CMD_TABLE.add_command("clist", cmd_clist, help_category="Comms")
def cmd_cdestroy(command):
"""
@ -385,6 +390,27 @@ def cmd_cemit(command):
Allows the user to send a message over a channel as long as
they own or control it. It does not show the user's name unless they
provide the /sendername switch.
[[channel_commands]]
Useful channel commands
(see their help pages for detailed help and options)
- Listing channels
clist - show all channels available to you
comlist - show channels you listen to
- Joining/parting channels
addcom - add your alias for a channel
delcom - remove alias for channel
(leave channel if no more aliases)
allcom - view, on/off or remove all your channels
clearcom - removes all channels
- Other
who - list who's online
<chanalias> off - silence channel temporarily
<chanalias> on - turn silenced channel back on
"""
source_object = command.source_object

View file

@ -765,7 +765,7 @@ def cmd_help(command):
# add the 'See also:' footer
topics = HelpEntry.objects.find_topicsuggestions(source_object,
topicstr)
topic.get_topicname())
if topics:
if len(topics) > 5:
topics = topics[:5]

View file

@ -1000,7 +1000,6 @@ def cmd_dig(command):
room_parent = None
exit_names = [None,None]
exit_parents = [None,None]
exit_aliases = [[], []]
#deal with arguments
arg_list = args.split("=",1)
@ -1019,13 +1018,10 @@ def cmd_dig(command):
rarg = arg_list[1]
exits = rarg.split(",",1)
for ie, exi in enumerate(exits):
aliaslist = exi.split(";")
name_and_parent = aliaslist.pop(0) #pops the first index
exit_aliases[ie] = aliaslist #what remains are the aliases
try:
exit_names[ie], exit_parents[ie] = [s.strip() for s in name_and_parent.split(":",1)]
exit_names[ie], exit_parents[ie] = [s.strip() for s in exi.split(":",1)]
except ValueError:
exit_names[ie] = name_and_parent.strip()
exit_names[ie] = exi.strip()
#start creating things.
if not room_name: