# Copyright (C) 2007-2012 Thomas Perl <thp.io/about>
# Copyright (C) 2010, 2011 Anaƫl Verrier <elghinn@free.fr>
-# Copyright (C) 2014-2015 kaliko <kaliko@azylum.org>
+# Copyright (C) 2014, 2015, 2020 kaliko <kaliko@azylum.org>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
import logging
import traceback
-import sleekxmpp
+import slixmpp
def botcmd(*args, **kwargs):
return lambda func: decorate(func, **kwargs)
-class MUCBot(sleekxmpp.ClientXMPP):
+class MUCBot(slixmpp.ClientXMPP):
prefix = '!'
self.__seen = dict()
self.register_plugin('xep_0030') # Service Discovery
self.register_plugin('xep_0045') # Multi-User Chat
+ self.register_plugin('xep_0071') # xhtml-im
self.register_plugin('xep_0199') # self Ping
# The session_start event will be triggered when
log_fd = open(log_file, 'w') if log_file else None
chandler = logging.StreamHandler(log_fd)
formatter = logging.Formatter(
- '%(asctime)s - %(name)s - %(levelname)s - %(message)s')
+ '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
+ )
chandler.setFormatter(formatter)
self.log.addHandler(chandler)
self.log.setLevel(log_level)
"""
self.get_roster()
self.send_presence()
- self.plugin['xep_0045'].joinMUC(self.room,
+ self.plugin['xep_0045'].join_muc(self.room,
self.nick,
# If a room password is needed, use:
# password=the_room_password,