Implemented clearcom as per MUX specifications (Issue 48).

Added a 'clear' argument to addcom as a shortcut to clearcom.
Changed addcom to now change the alias to a new one if giving the command on an already subscribed channel.
Added the exception in command handler so that giving the channel alias without argument gives an error instead
of sending None to the channel.
/Griatch
This commit is contained in:
Griatch 2009-08-30 12:28:38 +00:00
parent 117207e3ca
commit cdd4770330
3 changed files with 61 additions and 27 deletions

View file

@ -235,7 +235,9 @@ def match_channel(command):
elif command.command_argument == "last":
comsys.msg_chan_hist(command.source_object, cname)
raise ExitCommandHandler
if not command.command_argument:
command.source_object.emit_to("What do you want to say?")
raise ExitCommandHandler
second_arg = "%s=%s" % (cname, command.command_argument)
command.command_string = "@cemit"
command.command_switches = ["sendername", "quiet"]