当前位置: 首页>>代码示例>>Python>>正文


Python IRCClient.connectionLost方法代码示例

本文整理汇总了Python中twisted.words.protocols.irc.IRCClient.connectionLost方法的典型用法代码示例。如果您正苦于以下问题:Python IRCClient.connectionLost方法的具体用法?Python IRCClient.connectionLost怎么用?Python IRCClient.connectionLost使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在twisted.words.protocols.irc.IRCClient的用法示例。


在下文中一共展示了IRCClient.connectionLost方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     for channel in self.factory.channels:
         self.left(channel)
     loggirc2('Connection lost because: %s.' % reason)
     self.log("[disconnected at %s]" % time.asctime(time.localtime(time.time())))
     self.logger[config.BOTNAME].close()
     IRCClient.connectionLost(self, reason)
开发者ID:kerneis,项目名称:gazouilleur,代码行数:9,代码来源:bot.py

示例2: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     log.warn(
         "Disconnected from %s (%s:%s): %s" % (self.servername, self.factory.hostname, self.factory.port, reason)
     )
     IRCClient.connectionLost(self, reason)
     try:
         self.l.stop()  # All done now.
     except AssertionError:
         pass  # We never managed to connect in the first place!
开发者ID:cryogen,项目名称:yardbird,代码行数:11,代码来源:bot.py

示例3: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     IRCClient.connectionLost(self, reason)
     log.msg("[disconnected at %s]" % time.asctime(time.localtime(time.time())))
开发者ID:alchemist666,项目名称:chat-server,代码行数:5,代码来源:ircbot.py

示例4: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     IRCClient.connectionLost(self, reason)
     for logger in self.loggers.values():
         logger.log("[disconnected at %s]" %
             time.asctime(time.localtime(time.time())))
         logger.close()
开发者ID:oubiwann,项目名称:bot-prakasha-ke,代码行数:8,代码来源:logger.py

示例5: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
	def connectionLost(self, reason):
		IRCClient.connectionLost(self, reason)
		self.container._setBotinst(None)
		if self.state: self.state._resetnetwork()
		# TODO: reason needs to be properly formatted/actual reason being extracted from the "Failure" or whatever
		print "[disconnected: %s]" % reason
开发者ID:ckx,项目名称:pyBurlyBot,代码行数:8,代码来源:client.py

示例6: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     IRCClient.connectionLost(self, reason)
开发者ID:spicerack,项目名称:sage,代码行数:4,代码来源:client.py

示例7: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     RCBot.log('Server', "Disconnected")
     IRCClient.connectionLost(self, reason)
开发者ID:ryonsherman,项目名称:rcbot,代码行数:5,代码来源:rcbot.py

示例8: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
	def connectionLost(self, reason):
		IRCClient.connectionLost(self, reason)
		log.msg("[%s] Connection lost, unregistering." % self.host)
		relayer.unregister(self)
开发者ID:gkistler,项目名称:pytwitchirc,代码行数:6,代码来源:twitch.py

示例9: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     IRCClient.connectionLost(self, reason)
     print('disconnected')
     reactor.connectTCP(config["host"], config["port"], KittyFactory())
开发者ID:TazeTSchnitzel,项目名称:kittyskittles,代码行数:6,代码来源:main.py

示例10: connectionLost

# 需要导入模块: from twisted.words.protocols.irc import IRCClient [as 别名]
# 或者: from twisted.words.protocols.irc.IRCClient import connectionLost [as 别名]
 def connectionLost(self, reason):
     IRCClient.connectionLost(self, reason)
     self.l.stop() # All done now.
     log.warn("Disconnected from %s" % self.servername)
开发者ID:idan,项目名称:bluenotebot,代码行数:6,代码来源:bot.py


注:本文中的twisted.words.protocols.irc.IRCClient.connectionLost方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。