2.8 KiB
rbot
Getting started
Assuming you have go set up (http://golang.org/),
git clone git://github.com/kless/goconfig.git
cd goconfig
make -C config install
cd ..
git clone git://github.com/raylu/rbot.git
cd rbot
make -C irc install
make
rbot.conf and auth.conf will be copied. Configure those and then run the bot:
./rbot
Flags
Access is configured in auth.conf, is per-channel, based on ident and host; nick is ignored. The owner is configured per server and other access is configured per channel. Owners can use any commands.
The following is a description of the commands enabled by each flag:
a
: add removeo
: op halfop deop dehalfop kick|k ban|b unban|u kbh
: halfop|hop dehalfop|dehop kick ban unban kb (hop and dehop can only be used on yourself and you cannot kick or kb people with o or h)t
: topic appendtopics
: say
In addition, a user must have at least one flag to use flags
(so users without access can't spam the bot).
Commands
All commands are prefixed with the trigger configured in rbot.conf.
Access related commands:
flags raylu
: get's raylu's flagsflags
: get's your flagsadd raylu t
: gives raylu the t flagremove raylu t
: removes the t flag from rayluremove raylu
: removes all of raylu's flagssay text
: says text to the channel
Op commands:
halfop|hop
: halfop yourselfhalfop|hop raylu john
: halfop raylu and johnop
: op yourselfop raylu john
: op raylu and johndeop
: deop yourselfdeop raylu john
: deop raylu and johndehalfop
: dehalfop yourselfdehalfop|dehop raylu john
: dehalfop raylu and johnkick|k raylu
: kick rayluban|b raylu john!*@*
: ban raylu by hostname and john by nickunban|u raylu john!*@*
: unban raylu by hostname and john by nickkb raylu
: kick raylu, then ban him by hostnametopic text
: sets the topic and basetopic to texttopic
: gets the current basetopicappendtopic text
: if the topic does not starts with basetopic, sets the basetopic to the current topic. Makes the topic basetopic+text.
Google API commands:
tr text
: detect the language of texttr en|ja en|es text
: translate text into Japanese and Spanishcalc 2-1 usd in yen
: convert 1 USD to Japanese yen
Commands that don't require access behave the same when sent to a channel the bot is in and when whispered to the bot.
Commands that require access are listed above as if they were sent to a channel. When sent as a whisper, the first argument must be a channel name.
The bot will accept invites from the owner to any channel.
Miscellaneous
This project was forked from jessta/goirc which is in turn forked from fluffle/goirc. Both of those projects are focused on developing the goirc framework whereas this is focused on developing a bot.