• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python g_messengerEvents.onErrorReceived函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python XmppCooldownManager.XmppCooldownManager类代码示例发布时间:2022-05-27
下一篇:
Python g_settings.getColorScheme函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap