def connectionMade(self): SocketRPCProtocol.connectionMade(self) self.debug = settings.debug self.gameDB = self.factory.gameDB self.db = self.factory.db self.authenticated = False
def dispatch_call(self, method, id, args, kwargs): if not self.authenticated \ and settings.login_required \ and method != 'login': log.msg('Not executing %s - login required' % method) return defer.fail(Fault(LOGIN_REQUIRED, "Please login first!")) return SocketRPCProtocol.dispatch_call(self, method, id, args, kwargs)
def dispatch_call(self, method, id, args, kwargs): if not self.authenticated \ and settings.login_required \ and method != 'login': log.msg('Not executing %s - login required' % method) return defer.fail( Fault(LOGIN_REQUIRED, "Please login first!") ) return SocketRPCProtocol.dispatch_call(self, method, id, args, kwargs)