Twisted Python IRC 机器人设置频道模式
如何使用 Twisted Python 自动为我的频道中的用户提供语音并执行其他频道操作员命令(甚至网络操作员命令?例如处理虚拟主机请求等)?
How can I use Twisted Python to automatically voice users in my channel and do other channel operator commands (and even network oper commands? like handling vhost requests, etc.)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 IRCClient 的 mode 函数来设置通道和用户模式:
http://twistedmatrix.com/documents /11.0.0/api/twisted.words.protocols.irc.IRCClient.html#mode
如果您按照 http://www.eflorenzano.com/ blog/post/writing-markov-chain-irc-bot-twisted-and-python/ 然后你可以创建一个 privmsg 函数:
You can use the mode function of the IRCClient to set channel and user modes:
http://twistedmatrix.com/documents/11.0.0/api/twisted.words.protocols.irc.IRCClient.html#mode
If you follow the guide at http://www.eflorenzano.com/blog/post/writing-markov-chain-irc-bot-twisted-and-python/ then you could create a privmsg function: