我一直在研究这个 irc 机器人,只是看看我是否可以重新创建 ChanServ 或任何其他机器人可以提供的一些基本功能,我尝试制作这个小东西,但它仅限于一个昵称:
if '@wikia/Example JOIN #channel' in line:
print 'Giving op status to @wikia/Example'
self.s.send('MODE #channel Example +o\n')
仅当@wikia/Example 在开始时将#channel 与昵称Example 连接时才有效,但如果@wikia/Example 与昵称Example_rules 连接#channel,那么它将不起作用,因为我收到错误,昵称“Example”没有不存在。无论昵称是什么,@wikia/Example 怎么可能是 +o?
这是一条线的样子
:Nickname!~login@wikia/Example PRIVMSG #channel :This is a message.