本文整理匯總了Python中vilya.models.user.User.notify_irc方法的典型用法代碼示例。如果您正苦於以下問題:Python User.notify_irc方法的具體用法?Python User.notify_irc怎麽用?Python User.notify_irc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vilya.models.user.User
的用法示例。
在下文中一共展示了User.notify_irc方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: irc_receiver_filter
# 需要導入模塊: from vilya.models.user import User [as 別名]
# 或者: from vilya.models.user.User import notify_irc [as 別名]
def irc_receiver_filter(receivers, target):
from vilya.models.user import User
rs = set()
for receiver in receivers:
user = User(receiver)
if user and user.notify_irc(target):
rs.add(receiver)
return rs
示例2: notify_by_irc
# 需要導入模塊: from vilya.models.user import User [as 別名]
# 或者: from vilya.models.user.User import notify_irc [as 別名]
def notify_by_irc(target_obj, channel, message):
from vilya.models.user import User
user = User(channel)
notify_irc = user.notify_irc(target_obj) if user else None
if notify_irc:
send_message(channel, message)