1
0
mirror of https://github.com/gryf/weechat-xmpp.git synced 2025-12-19 12:28:12 +01:00

[mod] display usage information for jchat/jroom when no arguments are provided

This commit is contained in:
Laurent Peuch
2017-10-10 14:57:16 +02:00
parent b26da9eb10
commit 8549274ea3

View File

@@ -1727,6 +1727,8 @@ def jabber_cmd_jchat(data, buffer, args):
if not buddy.chat:
context["server"].add_chat(buddy)
weechat.buffer_set(buddy.chat.buffer, "display", "auto")
else:
weechat.prnt("", "Usage: /jchat <nickname>")
return weechat.WEECHAT_RC_OK
def jabber_cmd_room(data, buffer, args):
@@ -1761,6 +1763,8 @@ def jabber_cmd_room(data, buffer, args):
weechat.buffer_set(buddy.chat.buffer, "nicklist", "1")
weechat.buffer_set(buddy.chat.buffer, "nicklist_display_groups", "1")
weechat.buffer_set(buddy.chat.buffer, "display", "auto")
else:
weechat.prnt("", "Usage: /jroom <roomname>@conference.<server_FQDN> [<optional_user_nickname>]")
return weechat.WEECHAT_RC_OK
def jabber_cmd_jmsg(data, buffer, args):