Mercurial > libervia-backend
comparison frontends/src/jp/cmd_message.py @ 1864:96ba685162f6
jp: all commands now use the new start method and set need_loop in __init__ when needed
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 29 Feb 2016 16:52:51 +0100 |
parents | cb4be663a4a7 |
children | 3e168cde7a7d |
comparison
equal
deleted
inserted
replaced
1863:b2ddd7f5dcdf | 1864:96ba685162f6 |
---|---|
33 def add_parser_options(self): | 33 def add_parser_options(self): |
34 self.parser.add_argument("-s", "--separate", action="store_true", help=_("separate xmpp messages: send one message per line instead of one message alone.")) | 34 self.parser.add_argument("-s", "--separate", action="store_true", help=_("separate xmpp messages: send one message per line instead of one message alone.")) |
35 self.parser.add_argument("-n", "--new-line", action="store_true", help=_("add a new line at the beginning of the input (usefull for ascii art ;))")) | 35 self.parser.add_argument("-n", "--new-line", action="store_true", help=_("add a new line at the beginning of the input (usefull for ascii art ;))")) |
36 self.parser.add_argument("jid", type=str, help=_("the destination jid")) | 36 self.parser.add_argument("jid", type=str, help=_("the destination jid")) |
37 | 37 |
38 def connected(self): | 38 def start(self): |
39 super(Send, self).connected() | |
40 jids = self.host.check_jids([self.args.jid]) | 39 jids = self.host.check_jids([self.args.jid]) |
41 jid = jids[0] | 40 jid = jids[0] |
42 self.sendStdin(jid) | 41 self.sendStdin(jid) |
43 | 42 |
44 def sendStdin(self, dest_jid): | 43 def sendStdin(self, dest_jid): |