class MyST: def __init__(self): self.config = MySTConfig() if not self.config.get('config', 'account', 'user'): print 'MyServerTalks is not configured. Try to setup config.ini' sys.exit(1) # Get user and pass from MyST jabber user self.user = self.config.get('config', 'account', 'user') self.password = self.config.get('config', 'account', 'pass') self.user_handler = MySTUserHandler(self.config) print 'MyServerTalks! '+MySTBase.getVersion()+' running...\n' MySTLog.log('MyServerTalks! '+MySTBase.getVersion()+' running...') # Connect MyST def connect(self): self.conn = MySTConnection(MySTModuleManager(self.config, self.user_handler)) self.conn.connect(self.user, self.password) # Process informations and check connection state def looping(self): self.conn.loop()
def connect(self): self.conn = MySTConnection(MySTModuleManager(self.config, self.user_handler)) self.conn.connect(self.user, self.password)