GithubHelp home page GithubHelp logo

btbxbob / avbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from techme/qqbot

1.0 1.0 0.0 6.11 MB

avbot that bridges QQ groups and IRC channels and XMPP rooms

License: GNU Affero General Public License v3.0

C++ 81.88% Shell 0.94% C 8.63% Lua 8.46% Perl 0.01% PHP 0.02% Ruby 0.01% JavaScript 0.06%

avbot's Introduction

avbot = 聊天机器人(QQ云秘书)Build Status

avbot 连通 IRC、XMPP 和 QQ群,并能实时记录聊天信息。每日自动生成新的日志文件。

功能介绍

登录QQ,记录群消息

登录IRC,记录IRC消息

登录XMPP,记录XMPP聊天室消息

将群消息转发到IRC和XMPP聊天室

将IRC消息转发到QQ群和XMPP聊天室

将XMPP聊天室消息转发到QQ群和IRC

QQ图片转成 url 链接给 IRC和XMPP聊天室

登录 EMAIL (使用 pop3 协议), 获取邮件, 并转发到聊天室

将聊天内容转化为邮件发送到指定的邮箱(在聊天室使用 .qqbot mail to 命令)

支持lua作为脚本

rpm 包

为了方便群主,我特意为 CentOS6/RHEL6 准备了 RPM 包。该 RPM 是静态链接的boost,因此并不需要系统里升级 boost 库。

等啥,到 这里 下载安装吧

代码克隆办法

git clone git://github.com/avplayer/avbot.git
cd avbot
git submodule init
git submodule update

因为使用了 submodule 引入 avhttp 和 avproxy , 故而需要使用 git submodule update 来更新 avhttp 和 avproxy

编译办法

项目使用 cmake 编译。编译办法很简单

mkdir build
cd build
cmake [avbot源码的路径]
make -j8

lua支持开关

cmake时加上-DENABLE_LUA=on,可以编译带lua支持的版本。

编译依赖

依赖 boost。 boost 要 1.50 以上。

gloox 已经通过 bundle 的形式包含了,不需要外部依赖了。 如果使用的时候出现了段错误,请试试看使用系统的 gloox , 编译的时候通过 cmake -DINTERNALGLOOX=OFF 关闭内置gloox的使用。

使用

配置文件请参考 qqbotrc.example

读取配置文件 /etc/qqbotrc

配置文件的选项就是去掉 -- 的命令行选项。比如命令行接受 --qqnum 配置文件就写

qqnum=qq号码

就可以了。 命令行选项看看 --help 输出

IRC频道

频道名不带 # 比如

--ircrooms=ubuntu-cn,gentoo-cn,fedora-zh

逗号隔开, avbot 会分别加入这些聊天室.

XMPP 聊天室

也是逗号隔开

频道组

使用 --map 功能将频道和QQ群绑定成一组。被绑定的组内消息互通。

用法: --map=qq:123456,irc:avplayer;qq:3344567,irc:otherircchannel,mail,xmpp:linuxcn

频道名不带 # , XMPP 聊天室不带 @ 后面的服务器地址。

也可以在 /etc/qqbotrc 或者 ~/.qqbotrc 写,每行一个,不带 --。 如 map=qq:123456,irc:avplayer;qq:3344567,irc:otherircchannel,mail,xmpp:linuxcn;

频道组用 ; 隔开。组成份间用,隔离。

这个命令形式的意思四建立2个频道组. 第一个频道组包含 QQ群123456,irc频道#avplayer 第二个频道组包含qq群3344567,irc频道#otherircchannel, xmpp聊天室[email protected]. 以及接受邮件转发. 在同一个频道组的群也好,irc频道也罢, XMPP聊天室也好, 相互之间转发消息. 不在一个频道组的则不转发. 像沙箱一样的隔离掉,互不干扰.

获得帮助

我们在 IRC(irc.freenode.net ) 的 #avplayer 频道。 QQ群 3597082 还有 XMPP聊天室 [email protected]

thanks

谢谢 神话群群主提供的代码和建议;Youku的谢总(女)贡献的IRC代码。 还有 pidgin-lwqq 解析的 WebQQ 协议。

avbot's People

Contributors

microcai avatar lovey599 avatar kikidong avatar jackarain avatar btbxbob avatar invxp avatar biergaizi avatar hyqhyq3 avatar lihydra avatar darkfall avatar mrshelly avatar zh99998 avatar

Stargazers

Nicolas Wang avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.