summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Baumann <derflob@derflob.de>2016-07-16 22:53:28 +1200
committerFlorian Baumann <derflob@derflob.de>2016-07-16 22:53:28 +1200
commitb025c99e511703f1416ae27341b1c8b4b152eaf8 (patch)
treea5fd59c435419f6bf443b9a705ac08cd8aebbc96
parented045f4cb4f79fe8502634ee37f07affebabf5cc (diff)
downloaderr-xep-direct_invite.tar.gz
err-xep-direct_invite.tar.bz2
only try to leave groupchatsdirect_invite
-rw-r--r--XEPBot.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/XEPBot.py b/XEPBot.py
index f7bb044..41a92a6 100644
--- a/XEPBot.py
+++ b/XEPBot.py
@@ -37,6 +37,9 @@ class XEPBot(BotPlugin):
@botcmd
def leave_muc(self, msg, *args):
+ if (not msg.is_group):
+ return "Geh doch selber!"
+
room_jid = msg.frm.room.person
invited_to = self['invited_to']
left = False
@@ -59,6 +62,7 @@ class XEPBot(BotPlugin):
password = args[1]
else:
password = None
+
room = self.query_room(muc)
room.join(username=self.bot_config.CHATROOM_FN, password=password)