可扩展irc bot
berend的Python项目详细描述
berend是一个支持ssl的扭曲irc bot。如果您使用此模块,
您不必编写任何样板文件,而是可以
专注于编程您的bot的行为。
如果您使用ssl,则没有证书检查,因此请小心!
用法
----
要构建bot,需要编写bot配置文件(yaml)和一些
插件(简单的python模块)。
berend将查找的默认配置文件是“berend.yaml”。如果您想使用不同的配置文件,然后,您需要将
`berend_config`环境变量设置为其路径。
分发版中包含一个示例bot配置文件,看起来像这样:
berend.yaml:
host:irc.freenode.net
ssl:true
port:6697
channels:
-berend botje test
昵称:berend
realname:berend botje
on_connect是在connect上发送到服务器的原始命令列表,
关键是可导入的
点分隔的python模块名,该值将传递给
插件的设置方法。查看帮助插件以获取一个完整的
示例。
示例插件如下:
myberend/plugins/hello.py:
def setup(bot,config):
bot.respond('hello',hello,('hello','force bot to greet you'))
def hello(bot,user,channel,msg,matches):
bot.reply(user,channel,'你好,你是%s'%user)
另请参见
——
bot是一个扭曲的irc客户端。查看[Twisted文档](http://twistedmatrix.com/documents/12.2.0/api/twisted.words.protocols.irc.ircclient.html)和[irclogbot示例](http://twistedmatrix.com/documents/current/core/howto/clients.html auto5)以了解更多信息。
哦,当然还有:[berend博特耶](http://nl.wikipedia.org/wiki/berend_botje_ging_uit_varen)
您不必编写任何样板文件,而是可以
专注于编程您的bot的行为。
如果您使用ssl,则没有证书检查,因此请小心!
用法
----
要构建bot,需要编写bot配置文件(yaml)和一些
插件(简单的python模块)。
berend将查找的默认配置文件是“berend.yaml”。如果您想使用不同的配置文件,然后,您需要将
`berend_config`环境变量设置为其路径。
分发版中包含一个示例bot配置文件,看起来像这样:
berend.yaml:
ssl:true
port:6697
channels:
-berend botje test
昵称:berend
realname:berend botje
on_connect是在connect上发送到服务器的原始命令列表,
关键是可导入的
点分隔的python模块名,该值将传递给
插件的设置方法。查看帮助插件以获取一个完整的
示例。
示例插件如下:
myberend/plugins/hello.py:
def setup(bot,config):
bot.respond('hello',hello,('hello','force bot to greet you'))
def hello(bot,user,channel,msg,matches):
bot.reply(user,channel,'你好,你是%s'%user)
另请参见
——
bot是一个扭曲的irc客户端。查看[Twisted文档](http://twistedmatrix.com/documents/12.2.0/api/twisted.words.protocols.irc.ircclient.html)和[irclogbot示例](http://twistedmatrix.com/documents/current/core/howto/clients.html auto5)以了解更多信息。
哦,当然还有:[berend博特耶](http://nl.wikipedia.org/wiki/berend_botje_ging_uit_varen)