本文整理汇总了Python中supybot.ircmsgs.quit函数的典型用法代码示例。如果您正苦于以下问题:Python quit函数的具体用法?Python quit怎么用?Python quit使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了quit函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: testJoin
def testJoin(self):
st = irclib.IrcState()
st.addMsg(self.irc, ircmsgs.join('#foo', prefix=self.irc.prefix))
self.failUnless('#foo' in st.channels)
self.failUnless(self.irc.nick in st.channels['#foo'].users)
st.addMsg(self.irc, ircmsgs.join('#foo', prefix='[email protected]'))
self.failUnless('foo' in st.channels['#foo'].users)
st2 = st.copy()
st.addMsg(self.irc, ircmsgs.quit(prefix='[email protected]'))
self.failIf('foo' in st.channels['#foo'].users)
self.failUnless('foo' in st2.channels['#foo'].users)
开发者ID:krattai,项目名称:AEBL,代码行数:11,代码来源:test_irclib.py
示例2: reconnect
def reconnect(self, irc, msg, args, otherIrc, quitMsg):
"""[<network>] [<quit message>]
Disconnects and then reconnects to <network>. If no network is given,
disconnects and then reconnects to the network the command was given
on. If no quit message is given, uses the configured one
(supybot.plugins.Owner.quitMsg) or the nick of the person giving the
command.
"""
quitMsg = quitMsg or conf.supybot.plugins.Owner.quitMsg() or msg.nick
otherIrc.queueMsg(ircmsgs.quit(quitMsg))
if otherIrc != irc:
# No need to reply if we're reconnecting ourselves.
irc.replySuccess()
开发者ID:TingPing,项目名称:Limnoria,代码行数:14,代码来源:plugin.py
示例3: quit
def quit(self, irc, msg, args, text):
"""[<text>]
Exits the bot with the QUIT message <text>. If <text> is not given,
the default quit message (supybot.plugins.Owner.quitMsg) will be used.
If there is no default quitMsg set, your nick will be used.
"""
text = text or self.registryValue('quitMsg') or msg.nick
irc.noReply()
m = ircmsgs.quit(text)
world.upkeep()
for irc in world.ircs[:]:
irc.queueMsg(m)
irc.die()
开发者ID:boamaod,项目名称:Limnoria,代码行数:14,代码来源:plugin.py
示例4: disconnect
def disconnect(self, irc, msg, args, otherIrc, quitMsg):
"""[<network>] [<quit message>]
Disconnects from the network represented by the network <network>.
If <quit message> is given, quits the network with the given quit
message. <network> is only necessary if the network is different
from the network the command is sent on.
"""
quitMsg = quitMsg or conf.supybot.plugins.Owner.quitMsg() or msg.nick
otherIrc.queueMsg(ircmsgs.quit(quitMsg))
otherIrc.die()
conf.supybot.networks().discard(otherIrc.network)
if otherIrc != irc:
irc.replySuccess(_("Disconnection to %s initiated.") % otherIrc.network)
开发者ID:kytvi2p,项目名称:Limnoria,代码行数:14,代码来源:plugin.py
示例5: quit
def quit(self, irc, msg, args, text):
"""[<text>]
Exits the bot with the QUIT message <text>. If <text> is not given,
the default quit message (supybot.plugins.Owner.quitMsg) will be used.
If there is no default quitMsg set, your nick will be used. The standard
substitutions ($version, $nick, etc.) are all handled appropriately.
"""
text = text or self.registryValue('quitMsg') or msg.nick
text = ircutils.standardSubstitute(irc, msg, text)
irc.noReply()
m = ircmsgs.quit(text)
world.upkeep()
for irc in world.ircs[:]:
irc.queueMsg(m)
irc.die()
开发者ID:Hoaas,项目名称:Limnoria,代码行数:16,代码来源:plugin.py
示例6: testOuit
def testOuit(self):
self.prefix = '[email protected]'
self.irc.feedMsg(msg=ircmsgs.quit(prefix=self.prefix))
self.assertRegexp('gpg ident', 'not identified')
chan = irclib.ChannelState()
开发者ID:therealplato,项目名称:supybot-bitcoin-marketmonitor,代码行数:5,代码来源:test.py
示例7: testQuit
def testQuit(self):
self.failUnless(ircmsgs.quit(prefix='[email protected]'))
开发者ID:ElectroCode,项目名称:Limnoria,代码行数:2,代码来源:test_ircmsgs.py
注:本文中的supybot.ircmsgs.quit函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论