From: djmcgrath Date: Mon, 22 Oct 2007 15:02:44 +0000 (+0000) Subject: * New doc/ directory X-Git-Url: https://git.donarmstrong.com/?p=infobot.git;a=commitdiff_plain;h=b86e4aa78f8d3f7a678ad9a743bf477d5f937652 * New doc/ directory * Moved USAGE to doc/ * New pod formatted manual for infobot.users git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1592 c11ca15a-4712-0410-83d8-924469b57eb5 --- diff --git a/USAGE b/USAGE deleted file mode 100644 index 02b60ef..0000000 --- a/USAGE +++ /dev/null @@ -1,779 +0,0 @@ -# $Id$ - -############ -# EXAMPLES # -############ - -DCC CHAT: -.+chan #chan -.chanset #chan +autojoin -.chanset +autojoin -.chanunset -autojoin -.chanset -autojoin - -for list of configuration options, run: - ./scripts/findparam.pl - - -===== - blootbot: test is testing - me: okay - blootbot: testing? - testing is testing - - blootbot: tests is testing - me: okay - blootbot: tests? - testing - - blootbot: cough is coughs - me: okay - blootbot: cough -* blootbot/#blootbot coughs - - blootbot: test is What's (one|two|three|four|five|six) - times (seven|eight|nine|ten|eleven|twelve)? - okay, me - blootbot: test - What's four times nine? - blootbot: test? - What's six times ten? - - blootbot: op me is Mode change "+o $nick" on channel - $channel by $ident - me: okay - blootbot: op me -* blootbot/#debian-bots Mode change "+o me" on channel #blootbot by - blootbot - - blootbot: no who am i is You are $nick!$user@$host on - $channel. - okay, me - blootbot: who am i - You are me!me@home.org on #blootbot. - - blootbot: who last spoke is To my knowledge, $lastspeaker - was the last to say something worthwhile. - me: okay - blootbot: who last spoke - To my knowledge, me was the last to say something worthwhile. - - blootbot: percentage is you are $randpercentage% lame - me: okay - blootbot: percentage - you are 79% lame - - blootbot: slap $1 is slaps $1 - me: okay, me - blootbot: slap Bob - * blootbot slaps Bob - blootbot: forget cmd: slap (.*?) - me: i forgot cmd: slap (.*?) - - -################# -# USER COMMANDS # -################# - -Command: 4op -============= -Description: - ... - -Usage: REQUIRES +o flag. - 4op ... - -Example: - ... - - -Command: dumpvars -============= -Description: - ... - -Usage: REQUIRES +o flag. - dumpvars ... - -Example: - ... - - -Command: kick -============= -Description: - ... - -Usage: REQUIRES +o flag. - kick ... - -Example: - ... - - -Command: ignore -============= -Description: - ... - -Usage: REQUIRES +o flag. - ignore ... - -Example: - ... - - -Command: ignorelist -============= -Description: - ... - -Usage: REQUIRES +o flag. - ignorelist ... - -Example: - ... - - -Command: unignore -============= -Description: - ... - -Usage: REQUIRES +o flag. - unignore ... - -Example: - ... - - -Command: clear ignorelist -============= -Description: - ... - -Usage: REQUIRES +o flag. - clear ignorelist ... - -Example: - ... - - -Command: lobotomy -============= -Description: - ... - -Usage: REQUIRES +o flag. - lobotomy ... - -Example: - ... - - -Command: unlobotomy -============= -Description: - ... - -Usage: - unlobotomy ... - -Example: - ... - - -Command: op -============= -Description: - ... - -Usage: REQUIRES +o flag. - op ... - -Example: - ... - - -Command: say -============= -Description: - ... - -Usage: REQUIRES +o flag. - say ... - -Example: - ... - - -Command: die -============= -Description: - ... - -Usage: REQUIRES +n flag. - die ... - -Example: - ... - - -Command: jump -============= -Description: - ... - -Usage: REQUIRES +n flag. - jump ... - -Example: - ... - - -Command: rehash -============= -Description: - ... - -Usage: REQUIRES +n flag. - rehash ... - -Example: - ... - - -Command: set -============= -Description: - ... - -Usage: REQUIRES +n flag. - set ... - -Example: - ... - - -Command: unset -============= -Description: - ... - -Usage: REQUIRES +n flag. - unset ... - -Example: - ... - - -Command: chanstats -============= -Description: - Channel statistics is gathered while the bot is operation in those - channels it is located. They include: join, part, kick, ban, and - countless others. - -Usage: - chanstats [#channel] - -Example: - > blootbot: chanstats - i am on 2 channels: #blootbot #debian - i've cached 5 users distributed over 2 channels. - - > blootbot: chanstats #blootbot - On #blootbot, there have been 1 Join, 1 Op and 20 - PublicMsgs. - At the moment, 3 Opped and 3 Total. - - -Command: cmdstats -============= -Description: - ... - -Usage: - cmdstats ... - -Example: - ... - - -Command: crypt -============= -Description: - ... - -Usage: - crypt ... - -Example: - ... - - -Command: factinfo -============= -Description: - ... - -Usage: - factinfo ... - -Example: - ... - - -Command: factstats -============= -Description: - ... - -Usage: - factstats ... - -Example: - ... - - -Command: karma -============= -Description: - ... - -Usage: - karma ... - -Example: - ... - - -Command: spell -============= -Description: - ... - -Usage: - spell ... - -Example: - ... - - -Command: nslookup -============= -Description: - ... - -Usage: - nslookup ... - -Example: - ... - - -Command: part -============= -Description: - ... - -Usage: - part ... - -Example: - ... - - -Command: rot13 -============= -Description: - ... - -Usage: - rot13 ... - -Example: - ... - - -Command: wantNick -============= -Description: - ... - -Usage: - wantNick ... - -Example: - ... - - -Command: join -============= -Description: - The bot can be commanded to join a channel if it is not already on - there in the case of a kick/ban, invite only or invalid key to - name a few typical case scenarios. - - The channels which the bot can join is governed by the - configuration parameter labelled 'join_channels'. However, this - is ignored for those users with the +o flag in the user table. - -Usage: - join <#channel>[,key] - -Example: - > blootbot: join #blootbot - [blootbot] joining #blootbot - *** join/#debian blootbot (xk@router.home.org) - > blootbot: join #blootbot - [blootbot] I'm already on #blootbot... - - - - ====================================== - MODULE COMMANDS - ====================================== - -Command: babelfish -============= -Description: - ... - -Usage: - x from [language]: phrase - -Example: - ... - - -Command: debian package -============= -Description: - ... - -Usage: - [] ... - -Example: - ... - - -Command: dict -============= -Description: - ... - -Usage: - dict ... - -Example: - ... - - -Command: freshmeat -============= -Description: - ... - -Usage: - freshmeat ... - -Example: - ... - - -Command: google -============= -Description: - ... - -Usage: - google ... - -Example: DOES NOT WORK YET(??) - ... - - -Command: insult -============= -Description: - ... - -Usage: - insult ... - -Example: - ... - - -Command: kernel -============= -Description: - ... - -Usage: - kernel ... - -Example: - ... - - -Command: lart -============= -Description: - ... - -Usage: - lart ... - -Example: - ... - - -Command: list{keys|vals} -============= -Description: - ... - -Usage: - list{keys|vals} ... - -Example: - ... - - -Command: nickometer -============= -Description: - ... - -Usage: - nickometer ... - -Example: - ... - - -Command: quotes -============= -Description: - ... - -Usage: - quotes ... - -Example: - ... - - -Command: rootwarn -============= -Description: - ... - -Usage: - rootwarn ... - -Example: - ... - - -Command: seen -============= -Description: - ... - -Usage: - seen ... - -Example: - ... - - -Command: listauth -============= -Description: - ... - -Usage: - listauth ... - -Example: - ... - - -Command: slashdot -============= -Description: - ... - -Usage: - slashdot ... - -Example: - ... - - -Command: debian contents -============= -Description: - ... - -Usage: - debian ... - -Example: - ... - - -Command: topic -============= -Description: - ... - -Usage: - topic ... - -Example: - ... - - -Command: countdown -============= -Description: - ... - -Usage: - countdown ... - -Example: - ... - - -Command: uptime -============= -Description: - ... - -Usage: - uptime ... - -Example: - ... - - -Command: weather -============= -Description: - ... - -Usage: - weather ... - -Example: DOES NOT WORK - ... - - -Command: whatis -============= -Description: - ... - -Usage: - whatis ... - -Example: DOES NOT WORK - ... - - - -################################## -# MISCELLANEOUS/FACTOID COMMANDS # -################################## - -Command: forget -============= -Description: - ... - -Usage: - forget ... - -Example: - ... - - -Command: {un|}lock -============= -Description: - ... - -Usage: - {un|}lock ... - -Example: - ... - - -Command: rename -============= -Description: - ... - -Usage: - rename ... - -Example: - ... - - -Command: substitution -============= -Description: - ... - -Usage: - $factoid =~ s/from/to/ - $factoid =~ s#te/st/#test#g - -Example: - ... - - -Command: karma set -============= -Description: - ... - -Usage: - $nick++ - $nick-- - -Example: - blootbot++ - infobot-- - - -Command: maths -============= -Description: - ... - -Usage: - 2 + 2 - -Example: - ... - - -Command: tell -============= -Description: - ... - -Usage: - tell about - -Example: - ... diff --git a/doc/USAGE b/doc/USAGE new file mode 100644 index 0000000..02b60ef --- /dev/null +++ b/doc/USAGE @@ -0,0 +1,779 @@ +# $Id$ + +############ +# EXAMPLES # +############ + +DCC CHAT: +.+chan #chan +.chanset #chan +autojoin +.chanset +autojoin +.chanunset -autojoin +.chanset -autojoin + +for list of configuration options, run: + ./scripts/findparam.pl + + +===== + blootbot: test is testing + me: okay + blootbot: testing? + testing is testing + + blootbot: tests is testing + me: okay + blootbot: tests? + testing + + blootbot: cough is coughs + me: okay + blootbot: cough +* blootbot/#blootbot coughs + + blootbot: test is What's (one|two|three|four|five|six) + times (seven|eight|nine|ten|eleven|twelve)? + okay, me + blootbot: test + What's four times nine? + blootbot: test? + What's six times ten? + + blootbot: op me is Mode change "+o $nick" on channel + $channel by $ident + me: okay + blootbot: op me +* blootbot/#debian-bots Mode change "+o me" on channel #blootbot by + blootbot + + blootbot: no who am i is You are $nick!$user@$host on + $channel. + okay, me + blootbot: who am i + You are me!me@home.org on #blootbot. + + blootbot: who last spoke is To my knowledge, $lastspeaker + was the last to say something worthwhile. + me: okay + blootbot: who last spoke + To my knowledge, me was the last to say something worthwhile. + + blootbot: percentage is you are $randpercentage% lame + me: okay + blootbot: percentage + you are 79% lame + + blootbot: slap $1 is slaps $1 + me: okay, me + blootbot: slap Bob + * blootbot slaps Bob + blootbot: forget cmd: slap (.*?) + me: i forgot cmd: slap (.*?) + + +################# +# USER COMMANDS # +################# + +Command: 4op +============= +Description: + ... + +Usage: REQUIRES +o flag. + 4op ... + +Example: + ... + + +Command: dumpvars +============= +Description: + ... + +Usage: REQUIRES +o flag. + dumpvars ... + +Example: + ... + + +Command: kick +============= +Description: + ... + +Usage: REQUIRES +o flag. + kick ... + +Example: + ... + + +Command: ignore +============= +Description: + ... + +Usage: REQUIRES +o flag. + ignore ... + +Example: + ... + + +Command: ignorelist +============= +Description: + ... + +Usage: REQUIRES +o flag. + ignorelist ... + +Example: + ... + + +Command: unignore +============= +Description: + ... + +Usage: REQUIRES +o flag. + unignore ... + +Example: + ... + + +Command: clear ignorelist +============= +Description: + ... + +Usage: REQUIRES +o flag. + clear ignorelist ... + +Example: + ... + + +Command: lobotomy +============= +Description: + ... + +Usage: REQUIRES +o flag. + lobotomy ... + +Example: + ... + + +Command: unlobotomy +============= +Description: + ... + +Usage: + unlobotomy ... + +Example: + ... + + +Command: op +============= +Description: + ... + +Usage: REQUIRES +o flag. + op ... + +Example: + ... + + +Command: say +============= +Description: + ... + +Usage: REQUIRES +o flag. + say ... + +Example: + ... + + +Command: die +============= +Description: + ... + +Usage: REQUIRES +n flag. + die ... + +Example: + ... + + +Command: jump +============= +Description: + ... + +Usage: REQUIRES +n flag. + jump ... + +Example: + ... + + +Command: rehash +============= +Description: + ... + +Usage: REQUIRES +n flag. + rehash ... + +Example: + ... + + +Command: set +============= +Description: + ... + +Usage: REQUIRES +n flag. + set ... + +Example: + ... + + +Command: unset +============= +Description: + ... + +Usage: REQUIRES +n flag. + unset ... + +Example: + ... + + +Command: chanstats +============= +Description: + Channel statistics is gathered while the bot is operation in those + channels it is located. They include: join, part, kick, ban, and + countless others. + +Usage: + chanstats [#channel] + +Example: + > blootbot: chanstats + i am on 2 channels: #blootbot #debian + i've cached 5 users distributed over 2 channels. + + > blootbot: chanstats #blootbot + On #blootbot, there have been 1 Join, 1 Op and 20 + PublicMsgs. + At the moment, 3 Opped and 3 Total. + + +Command: cmdstats +============= +Description: + ... + +Usage: + cmdstats ... + +Example: + ... + + +Command: crypt +============= +Description: + ... + +Usage: + crypt ... + +Example: + ... + + +Command: factinfo +============= +Description: + ... + +Usage: + factinfo ... + +Example: + ... + + +Command: factstats +============= +Description: + ... + +Usage: + factstats ... + +Example: + ... + + +Command: karma +============= +Description: + ... + +Usage: + karma ... + +Example: + ... + + +Command: spell +============= +Description: + ... + +Usage: + spell ... + +Example: + ... + + +Command: nslookup +============= +Description: + ... + +Usage: + nslookup ... + +Example: + ... + + +Command: part +============= +Description: + ... + +Usage: + part ... + +Example: + ... + + +Command: rot13 +============= +Description: + ... + +Usage: + rot13 ... + +Example: + ... + + +Command: wantNick +============= +Description: + ... + +Usage: + wantNick ... + +Example: + ... + + +Command: join +============= +Description: + The bot can be commanded to join a channel if it is not already on + there in the case of a kick/ban, invite only or invalid key to + name a few typical case scenarios. + + The channels which the bot can join is governed by the + configuration parameter labelled 'join_channels'. However, this + is ignored for those users with the +o flag in the user table. + +Usage: + join <#channel>[,key] + +Example: + > blootbot: join #blootbot + [blootbot] joining #blootbot + *** join/#debian blootbot (xk@router.home.org) + > blootbot: join #blootbot + [blootbot] I'm already on #blootbot... + + + + ====================================== + MODULE COMMANDS + ====================================== + +Command: babelfish +============= +Description: + ... + +Usage: + x from [language]: phrase + +Example: + ... + + +Command: debian package +============= +Description: + ... + +Usage: + [] ... + +Example: + ... + + +Command: dict +============= +Description: + ... + +Usage: + dict ... + +Example: + ... + + +Command: freshmeat +============= +Description: + ... + +Usage: + freshmeat ... + +Example: + ... + + +Command: google +============= +Description: + ... + +Usage: + google ... + +Example: DOES NOT WORK YET(??) + ... + + +Command: insult +============= +Description: + ... + +Usage: + insult ... + +Example: + ... + + +Command: kernel +============= +Description: + ... + +Usage: + kernel ... + +Example: + ... + + +Command: lart +============= +Description: + ... + +Usage: + lart ... + +Example: + ... + + +Command: list{keys|vals} +============= +Description: + ... + +Usage: + list{keys|vals} ... + +Example: + ... + + +Command: nickometer +============= +Description: + ... + +Usage: + nickometer ... + +Example: + ... + + +Command: quotes +============= +Description: + ... + +Usage: + quotes ... + +Example: + ... + + +Command: rootwarn +============= +Description: + ... + +Usage: + rootwarn ... + +Example: + ... + + +Command: seen +============= +Description: + ... + +Usage: + seen ... + +Example: + ... + + +Command: listauth +============= +Description: + ... + +Usage: + listauth ... + +Example: + ... + + +Command: slashdot +============= +Description: + ... + +Usage: + slashdot ... + +Example: + ... + + +Command: debian contents +============= +Description: + ... + +Usage: + debian ... + +Example: + ... + + +Command: topic +============= +Description: + ... + +Usage: + topic ... + +Example: + ... + + +Command: countdown +============= +Description: + ... + +Usage: + countdown ... + +Example: + ... + + +Command: uptime +============= +Description: + ... + +Usage: + uptime ... + +Example: + ... + + +Command: weather +============= +Description: + ... + +Usage: + weather ... + +Example: DOES NOT WORK + ... + + +Command: whatis +============= +Description: + ... + +Usage: + whatis ... + +Example: DOES NOT WORK + ... + + + +################################## +# MISCELLANEOUS/FACTOID COMMANDS # +################################## + +Command: forget +============= +Description: + ... + +Usage: + forget ... + +Example: + ... + + +Command: {un|}lock +============= +Description: + ... + +Usage: + {un|}lock ... + +Example: + ... + + +Command: rename +============= +Description: + ... + +Usage: + rename ... + +Example: + ... + + +Command: substitution +============= +Description: + ... + +Usage: + $factoid =~ s/from/to/ + $factoid =~ s#te/st/#test#g + +Example: + ... + + +Command: karma set +============= +Description: + ... + +Usage: + $nick++ + $nick-- + +Example: + blootbot++ + infobot-- + + +Command: maths +============= +Description: + ... + +Usage: + 2 + 2 + +Example: + ... + + +Command: tell +============= +Description: + ... + +Usage: + tell about + +Example: + ... diff --git a/doc/infobot.users.pod b/doc/infobot.users.pod new file mode 100644 index 0000000..264196a --- /dev/null +++ b/doc/infobot.users.pod @@ -0,0 +1,158 @@ +=pod + +=head1 NAME + +infobot.users - User accounts database for infobot + +=head1 SYNOPSIS + + # Please edit to your needs. + # "local" is used for CLI mode + # Passwords can be generated with mkpasswd in linux + + _default + --FLAGS amrt + --HOSTS *!*@* + + local + --FLAGS Aemnorst + --HOSTS local!local@local + --PASS xxfxfIfoJHdYg + + timriker + --FLAGS Aemnorst + --HOSTS *!~timr@TimRiker.active.supporter.pdpc + --PASS xxfxfIfoJHdYg + + xk + --FLAGS emnorst + --HOSTS *!xk@example.com + --HOSTS *!xk@superbox.home.org + --PASS 5K/rmJPzwxJhU + +=head1 DESCRIPTION + +This file controls who has access to use your infobot. + +=head1 FIELDS + +There are various fields allowed in your file. Whitespace is ignored, and as +usual, any line starting with a C<#> is treated as a comment. + +The first non whitespace/comment line in your file, is the user name for the +account you are about to define. Take note that a special username called +C<_default>, is meant to define what everyone who doesnt have an account in this +file should use for permissions. + +Also, the special user name C, is used when you run the bot in B +mode (console only, no B connection). As well, the C user requires a +special hostmask of S>. + +Below is a list of the valid options available for each user account. + +=over + +=item B<--FLAGS> + +This field is a list of possible flags that this account has. Think of them as +similar to irc user modes (although, with different meanings). + +Here is a list of the current flags available, and their meanings: + +I + +=over + +=item * + +B - bot administration over /msg (default is only via DCC CHAT) + +=item * + +B - dynamic ops (as on channel). (automatic +o) + +=item * + +B - add topics. + +=item * + +B - ask/request factoid. + +=item * + +B - modify factoid. (includes renaming) + +=item * + +B - bot owner, can "reload" + +=item * + +B - master of bot (automatic +amrt). + +=over + +=item * + +Can search on factoid strings shorter than 2 chars + +=item * + +Can tell bot to join new channels + +=item * + +Can [un]lock factoids + +=back + +=item * + +B - remove factoid. + +=item * + +B - teach/add factoid. + +=item * + +B - Bypass +silent on channels + +=back + +=item B<--HOSTS> + +This field is used to specify a hostmask that a user must appear from for the +bot to consider them to be this specific account definition. + +This hostmask takes the form of: I + +I + +=item B<--PASS> + +This field used a C formated password, that is used for B chats to +the bot, or if you need to identify yourself to the bot in the event that you +come from a different host. + +You can generate one using the C command, available on most systems. + +For example: + + infobot@myhost:~$ mkpasswd + Password: test + GVrl9PMBB0gpw + +You can also change your password at anytime by sending the bot a C +command on B. + +=back + +=head1 BUGS + +At some point, it is likely that the C account will be removed and +implied to have full access. + +=cut +