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

[mod] lower indentantion, add a error message when not connected to a jabber server

This commit is contained in:
Laurent Peuch
2017-10-10 15:01:59 +02:00
parent e23bf85f50
commit b8e9666608

View File

@@ -1787,7 +1787,10 @@ def jabber_cmd_room(data, buffer, args):
context = jabber_search_context(buffer)
server = context["server"]
if server:
if not server:
weechat.prnt("", "Error: this command needs to be runned in a jabber server buffer, switch to a jabber buffer or use /jabber add|connect for that.")
return weechat.WEECHAT_RC_ERROR
buddy = server.search_buddy_list(args, by='alias')
if not buddy: