本文整理汇总了Python中messenger.proto.events.g_messengerEvents.onErrorReceived函数的典型用法代码示例。如果您正苦于以下问题:Python onErrorReceived函数的具体用法?Python onErrorReceived怎么用?Python onErrorReceived使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了onErrorReceived函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: _onResponseFailure
def _onResponseFailure(self, ids, args):
if super(AdminChatCommandHandler, self)._onResponseFailure(ids, args):
error = errors.createAdminCommandError(args)
if error:
g_messengerEvents.onErrorReceived(error)
else:
LOG_WARNING('Error is not resolved on the client', ids, args)
开发者ID:webiumsk,项目名称:WOT-0.9.12,代码行数:7,代码来源:chat_handlers.py
示例2: error
def error(self, pyGlooxTag):
error = self._getError(pyGlooxTag)
if error:
g_messengerEvents.onErrorReceived(error)
else:
g_logOutput.error(_LOG_AREA.PY_WRAPPER, 'Error is not resolved on the client', self.__class__.__name__, pyGlooxTag.getXml())
self._result = TASK_RESULT.CLEAR
开发者ID:webiumsk,项目名称:WoT,代码行数:7,代码来源:tasks.py
示例3: _onResponseFailure
def _onResponseFailure(self, ids, args):
if super(VOIPChatProvider, self)._onResponseFailure(ids, args):
error = errors.createVOIPError(args)
if error:
g_messengerEvents.onErrorReceived(error)
else:
LOG_WARNING('Error is not resolved on the client', ids, args)
开发者ID:webiumsk,项目名称:WoT,代码行数:7,代码来源:voipchatprovider.py
示例4: createPrivateChannel
def createPrivateChannel(self, dbID, name):
if GUI_SETTINGS.useXmppToCreatePrivate:
result, error = self.__xmppProto.messages.startChatSession(dbID, name)
if not result:
g_messengerEvents.onErrorReceived(error)
else:
self.__bwProto.users.createPrivateChannel(dbID, name)
return True
开发者ID:webiumsk,项目名称:WoT,代码行数:8,代码来源:contacts.py
示例5: _setIQError
def _setIQError(self, tag):
if self._step == ENTRY_STEP.SET_DATA_FORM:
self._sendPresence(chat_ext.MUCLeaveQuery(self._getUserJID()))
error = errors.createServerUserRoomCreationIQError(tag, self._room.getName())
if error is not None:
g_messengerEvents.onErrorReceived(error)
self._remove()
return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:8,代码来源:muc.py
示例6: sendChatMessage
def sendChatMessage(self, jid, body):
if self.__cooldown.isInProcess(CLIENT_ACTION_ID.SEND_MESSAGE):
g_messengerEvents.onErrorReceived(ChatCoolDownError(CLIENT_ACTION_ID.SEND_MESSAGE, self.__limits.getBroadcastCoolDown()))
return
body = self.__msgFilters.chainOut(body, self.__limits)
if not body:
return
self.__chatSessions.sendMessage(ContactBareJID(jid), body, self.__msgFilters)
self.__cooldown.process(CLIENT_ACTION_ID.SEND_MESSAGE)
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:9,代码来源:messages.py
示例7: sendPassword
def sendPassword(self, value):
validator = self.proto.messages.getUserRoomValidator()
password, error = validator.validateUserRoomPwd(value)
if error is not None:
g_messengerEvents.onErrorReceived(error)
else:
self.proto.messages.joinToUserRoom(self._channel.getID(), password=password)
self.destroy()
return
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:9,代码来源:connecttosecurechannelwindow.py
示例8: parseLine
def parseLine(self, text, clientID = 0):
cmd, result = None, admin_chat_cmd.parseCommandLine(text)
if not result:
return (False, None)
if result.hasError():
g_messengerEvents.onErrorReceived(result.getError())
else:
decorator = admin_chat_cmd.makeDecorator(result, clientID)
if self.send(decorator):
cmd = decorator
return (True, cmd)
开发者ID:kblw,项目名称:wot_client,代码行数:11,代码来源:chat_handlers.py
示例9: _onResponseFailure
def _onResponseFailure(self, ids, args):
actionID = super(VOIPChatProvider, self)._onResponseFailure(ids, args)
if actionID is None:
return
error, logOnly = errors.createVOIPError(args, actionID)
if error:
if logOnly:
LOG_NOTE(error)
else:
g_messengerEvents.onErrorReceived(error)
else:
LOG_WARNING('Error is not resolved on the client to display in GUI', actionID, ids, args)
开发者ID:kblw,项目名称:wot_client,代码行数:12,代码来源:voipchatprovider.py
示例10: sendMessage
def sendMessage(self, jid, body, filters):
channel = self.channelsStorage.getChannel(entities.XMPPChatChannelEntity(jid))
if channel:
if self.playerCtx.isChatBan():
error = createChatBanError(self.playerCtx.getBanInfo())
if error:
g_messengerEvents.onErrorReceived(error)
return
dbID = getPlayerDatabaseID()
name = getPlayerName()
g_messengerEvents.channels.onMessageReceived(XMPPMessageData(dbID, name, filters.chainIn(dbID, body), time.time()), channel)
self.client().sendMessage(ChatMessageHolder(jid, msgBody=body))
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:12,代码来源:messages.py
示例11: _setPresenceError
def _setPresenceError(self, tag):
error = errors.createServerActionPresenceError(self._getActionID(), tag)
if error is not None:
if error.getErrorType() == ERROR_TYPE.AUTH and error.getCondition() == 'not-authorized' and self._step != ENTRY_STEP.PASSWORD_REQUIRED:
self._step = ENTRY_STEP.PASSWORD_REQUIRED
g_messengerEvents.channels.onConnectingToSecureChannel(self._room)
else:
g_messengerEvents.onErrorReceived(error)
self._remove()
else:
self._remove()
return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:12,代码来源:muc.py
示例12: sendMessage
def sendMessage(self, jid, body, filters):
_, exists = self._searchChannel(jid)
if exists is None:
return
elif self.playerCtx.isBanned(components=exists.getBanComponent()):
error = createChatBanError(self.playerCtx.getBanInfo())
if error:
g_messengerEvents.onErrorReceived(error)
return
else:
self._repeatMessage(exists, body, filters)
self.client().sendMessage(chat_ext.ChatMessageHolder(exists.getMessageType(), jid, msgBody=body))
return
开发者ID:webiumsk,项目名称:WOT-0.9.14-CT,代码行数:13,代码来源:provider.py
示例13: doAction
def doAction(self, actionID, args = None, response = False, skipCoolDown = False):
success, reqID = False, 0
if self.__coolDown.isInProcess(actionID):
if not skipCoolDown:
g_messengerEvents.onErrorReceived(createCoolDownError(actionID))
else:
if response:
reqID = self.__idGen.next()
if self.__isEnabled:
success = self.__sendAction(actionID, reqID, args)
else:
success = self.__addActionToQueue(actionID, reqID, args)
return (success, reqID)
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:13,代码来源:provider.py
示例14: _join
def _join(self, info):
if info is not None:
statuses = info.statuses
else:
statuses = ()
if MUC_STATUS.SELF_PRESENCE in statuses and MUC_STATUS.CREATE_ROOM in statuses:
self._step = ENTRY_STEP.SET_DATA_FORM
self._sendIQ(chat_ext.UserRoomConfigurationFormSet(self._room.getID(), self._room.getName(), self._room.getPassword()))
else:
g_messengerEvents.onErrorReceived(ClientActionError(CLIENT_ACTION_ID.CREATE_USER_ROOM, CLIENT_ERROR_ID.GENERIC))
self._result = ACTION_RESULT.DO_NOTHING
self._sendPresence(chat_ext.MUCLeaveQuery(self._getUserJID()))
return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:13,代码来源:muc.py
示例15: handleIQ
def handleIQ(self, iqID, iqType, tag):
if iqID == self.__iqID:
if iqType == IQ_TYPE.RESULT:
self.__state = _HISTORY_RQ_STATE.RESULT
elif iqType == IQ_TYPE.ERROR:
self.__state = _HISTORY_RQ_STATE.UNAVAILABLE
error = errors.createServerActionIQError(CLIENT_ACTION_ID.RQ_HISTORY, tag)
if error:
g_messengerEvents.onErrorReceived(error)
while self.__pool:
self.__setChannelHistory(self.__pool.pop(0))
result = True
else:
result = False
return result
开发者ID:webiumsk,项目名称:WOT-0.9.15-CT,代码行数:16,代码来源:chat_session.py
示例16: createChannel
def createChannel(self, name, usePassword, password, retype):
validator = self.proto.messages.getUserRoomValidator()
name, error = validator.validateUserRoomName(name)
if error is not None:
g_messengerEvents.onErrorReceived(error)
return
else:
if usePassword:
pwd, error = validator.validateUserRoomPwdPair(password, retype)
if error is not None:
g_messengerEvents.onErrorReceived(error)
return
result = self.proto.messages.createUserRoom(name, password)
if result:
self.destroy()
return
开发者ID:webiumsk,项目名称:WOT-0.9.15.1,代码行数:16,代码来源:channelsmanagementwindow.py
示例17: sendChatMessage
def sendChatMessage(self, jid, body):
if self.__cooldown.isInProcess(CLIENT_ACTION_ID.SEND_MESSAGE):
g_messengerEvents.onErrorReceived(ChatCoolDownError(CLIENT_ACTION_ID.SEND_MESSAGE, MESSAGE_LIMIT.COOLDOWN))
return
self.__chatSessions.sendMessage(ContactBareJID(jid), body)
self.__cooldown.process(CLIENT_ACTION_ID.SEND_MESSAGE)
开发者ID:webiumsk,项目名称:WoT,代码行数:6,代码来源:messages.py
示例18: addFriend
def addFriend(self, dbID, name, group = None):
result, error = self.__xmppProto.contacts.addFriend(dbID, name, group)
if not result:
g_messengerEvents.onErrorReceived(error)
return result
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:5,代码来源:contacts.py
示例19: addIgnored
def addIgnored(self, dbID, name):
result, error = self.__xmppProto.contacts.addIgnored(dbID, name)
if not result:
g_messengerEvents.onErrorReceived(error)
return result
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:5,代码来源:contacts.py
示例20: removeNote
def removeNote(self, dbID):
result, error = self.__xmppProto.contacts.removeNote(dbID)
if not result:
g_messengerEvents.onErrorReceived(error)
return result
开发者ID:krzcho,项目名称:WOTDecompiled,代码行数:5,代码来源:contacts.py
注:本文中的messenger.proto.events.g_messengerEvents.onErrorReceived函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论