本文整理匯總了Python中channel.Channel.userlist方法的典型用法代碼示例。如果您正苦於以下問題:Python Channel.userlist方法的具體用法?Python Channel.userlist怎麽用?Python Channel.userlist使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類channel.Channel
的用法示例。
在下文中一共展示了Channel.userlist方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: join_channel
# 需要導入模塊: from channel import Channel [as 別名]
# 或者: from channel.Channel import userlist [as 別名]
def join_channel(self, chan):
"""
Notify the client that he has joined the channel, and supply the
client with a userlist.
"""
try:
chan = Channel(chan)
except NameError:
chan = Channel.channels[chan]
if chan not in self.user.channels:
logging.debug("Putting user '%s' in channel '%s'" % (self.user.nickname, chan.name))
chan.add_user(self.user)
self.user.add_channel(chan)
self.server.queue_message("JOINED: %s\r\n" % chan.name, self.sock)
self.server.queue_message("USERLIST %s: %s\r\n" % (chan.name, chan.userlist()), self.sock)