Skip to content

Commit

Permalink
Minor logical fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oskopek committed Jan 26, 2014
1 parent 4b198c6 commit 1e07af1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions cryptoim/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,17 +211,14 @@ def do_send(self, arg):
message = ' '.join(splitted)

else: # if chat mode off
if sanit_arg_count_exact(splitted, 0):
#input: send (empty argument)
self.print_cmd('Usage: send <username> or send <JID>')
return self.return_cli(False)

if self.config_find(splitted[0]): # if sending to friend
recipient = self.config_find(splitted[0])
elif sanit_is_jid(splitted[0]): # if sending to jid
recipient = splitted[0]
else: # error: username not defined or jid isnt jid
self.print_cmd(splitted[0] + ' is not recognized. Please enter valid JID or username.')
if splitted[0]:
self.print_cmd(splitted[0] + ' is not recognized. Please enter valid JID or username.')
self.print_cmd('Usage: send <username> <message> or send <JID> <message>')
return self.return_cli(False)

Expand Down

0 comments on commit 1e07af1

Please sign in to comment.