"""Echo user's input line, once. Note, that manager.send_message() may do echo
itself (it indicates if it did it in the return value).
"""
if not echoed:
console.copy_input_line(value)
echoed.append(1)
try:
- if value.startswith(':') and value[1:].split()[0] in commands:
+ command = value[1:] and manager.get_cmd(value[1:].split()[0])
+ if command:
echo()
args = value[1:].split()
- command = commands[args[0]]
command(*args[1:])
else:
if value:
if manager.send_message(value):
echoed.append(1)
except UserCommandError, ex:
echo()
print ex
# will get there without echoing if user pressed enter on an empty line; let's echo it
echo()
-description = "This script will either sit idle waiting for an incoming session, or start a new session with the specified target SIP address. The program will close the session and quit when CTRL+D is pressed. This scripts supports RTP audio and MSRP chat sessions."
+description = "This script will either sit idle waiting for an incoming session, or start a new session with the specified target SIP address. The program will close the session and quit when CTRL-D is pressed. This scripts supports RTP audio and MSRP chat sessions."