summaryrefslogtreecommitdiff
path: root/poezio/core/commands.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/core/commands.py')
-rw-r--r--poezio/core/commands.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 5c8199c0..f301e801 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -763,6 +763,20 @@ class CommandCore:
self.core.invite(to.full, room, reason=reason)
self.core.information('Invited %s to %s' % (to.bare, room), 'Info')
+ @command_args_parser.quoted(1, 0)
+ def impromptu(self, args):
+ """/impromptu <jid> [<jid> ...]"""
+
+ if args is None:
+ return self.help('impromptu')
+
+ jids = []
+ for jid in common.shell_split(' '.join(args)):
+ jids.append(safeJID(jid).bare)
+
+ self.core.impromptu(jids)
+ self.core.information('Invited %s to a random room' % (' '.join(jids)), 'Info')
+
@command_args_parser.quoted(1, 1, [''])
def decline(self, args):
"""/decline <room@server.tld> [reason]"""