def on_xmpp_message(self, message):
        """Handler for XMPP incoming messages event"""
        sender = str(message["from"])
        if message["type"] == "normal" and sender[2:3] == "~": #Groupchat invite
            inviter = message["body"][0:message["body"].find(" ")]
            if self.room_invite_message:
                self.message(inviter, self.room_invite_message)
        elif message["type"] in ("chat", "groupchat") and "/" in sender:
            msg = message["body"]
            command     = msg.split()[0]
            args        = msg[len(command)+1:].split(", ")

            if not args[0]:
                args = []
            if command in self.commands:
                adminCommand = getattr(self.commands[command], "_zxLoLBoT_command_admin", False)
                 #Checks if it's an administrator-only command and if the sender is an admin
                if (adminCommand and self.is_admin(sender)) or not adminCommand:
                    if getattr(self.commands[command], "_zxLoLBoT_command_need_arg", False) and not args:
                        if self.need_arg_message:
                            self.message(sender, self.need_arg_message.replace("%COMMAND%", command))
                    else:
                        threading.Thread(target=self.commands[command], args=(sender, args)).start()
                elif self.not_admin_message:
                    self.message(sender, self.not_admin_message)
            elif self.invalid_command_message:
                self.message(sender, self.invalid_command_message.replace("%COMMAND%", command))

            #Event handling
            summoner_id = self.jid_to_summoner_id(sender)
            if self.riot_api_key and sender[2:3] != "~":
                if self.summoner_ids_to_name not in summoner_id:
                    self.summoner_ids_to_name[summoner_id] = self.summoner_id_to_name(summoner_id)
                self.fire_event("message", sender=sender, message=msg, summoner_id=summoner_id, summoner_name=self.summoner_ids_to_name[summoner_id])
            else:
                self.fire_event("message", sender=sender, message=msg, summoner_id=summoner_id)
        elif message["type"] == "normal" and str(message["from"])[2:3] == "~": #Groupchat invite
            inviter = message["body"][0:message["body"].find(" ")]
            if self.room_invite_message:
                self.message(inviter, self.room_invite_message)
dataset/ETHPy150Open Mathzx/zxLoLBoT/zxlolbot.py/zxLoLBoT.on_xmpp_message/swapped operands of `not in`