From 8c02af53f6f6b48e13fcea6462b41a2323435a35 Mon Sep 17 00:00:00 2001 From: djmcgrath Date: Sat, 20 Oct 2007 00:20:39 +0000 Subject: [PATCH] * Updated BUGS list * SQL table fix, channel size should 30 chars max (db table backup/drop/recreate/restore needed) * New USAGE and FAQ file to help new users (location/filenames/format may change) git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk@1587 c11ca15a-4712-0410-83d8-924469b57eb5 --- BUGS | 3 +- FAQ | 34 ++ USAGE | 779 +++++++++++++++++++++++++++++++++++++ setup/mysql/news.sql | 2 +- setup/mysql/onjoin.sql | 2 +- setup/mysql/rootwarn.sql | 2 +- setup/mysql/seen.sql | 2 +- setup/mysql/stats.sql | 2 +- setup/pgsql/news.sql | 2 +- setup/pgsql/onjoin.sql | 2 +- setup/pgsql/rootwarn.sql | 2 +- setup/pgsql/seen.sql | 2 +- setup/pgsql/stats.sql | 2 +- setup/sqlite/news.sql | 2 +- setup/sqlite/onjoin.sql | 2 +- setup/sqlite/rootwarn.sql | 2 +- setup/sqlite/seen.sql | 2 +- setup/sqlite/stats.sql | 2 +- setup/sqlite2/news.sql | 2 +- setup/sqlite2/onjoin.sql | 2 +- setup/sqlite2/rootwarn.sql | 2 +- setup/sqlite2/seen.sql | 2 +- setup/sqlite2/stats.sql | 2 +- 23 files changed, 834 insertions(+), 22 deletions(-) create mode 100644 FAQ create mode 100644 USAGE diff --git a/BUGS b/BUGS index 85389ce..e7c0944 100644 --- a/BUGS +++ b/BUGS @@ -1,7 +1,5 @@ Known bugs that should be dealt with soon as possible: - * "+sed" can currently be used to flood the boot off the network. Disable for now - * allows adding a "cmd:foo (.*)" factoid but not removing it (not sure if this still applies) * Older CMD: foo's cannot be used or removed. Must be removed manually from the database with SQL * !+topic list gives and incorrect error Failed. "You (#botpark) are not in #botpark, hey?" * Bot tries to ask chanserv for OP's on any channel. Should be a chanset setting on a per channel basis @@ -9,3 +7,4 @@ Known bugs that should be dealt with soon as possible: * bot doesnt seem to keep track of stat counters for "heh :) ...etc". Might be settings though and not a bug * !help has size issues. Add's extra lines with only 1 or 2 help commands instead of one maximum size IRC msg * FIXME: !WARN! ircCheck: we have a NULL chan in hash channels? removing! + * Bot can be flooded offline with a crash if !+factstats help and /msg nick factstats help, are used at the same time diff --git a/FAQ b/FAQ new file mode 100644 index 0000000..37f4cf2 --- /dev/null +++ b/FAQ @@ -0,0 +1,34 @@ +# $Id$ + +Q: The bot exits after I run 'factstats testing' or 'kernel' or anything + that uses fork(). Is this a bug in the bot? + +A: No, this is not a bug in the bot but rather Net::IRC. A cheap hack is + to edit /usr/lib/perl5/Net/IRC/Connection.pm, search for DESTROY, and + comment out '$self->quit();' +A: Apply the patches in the patches/ directory. + + +Q: I notice that, in the bot logs, the bot attempts to close all current + DCC CHAT connections whenever a forked process ends. Why is this? + +A: Yet another bug in Net::IRC. Currently, DCC CHAT connections are not + closed because there is an endless-loop bug when it is done. + + +Q: I executed 'scripts/setup_user.pl' but it said 'connection refused to + localhost' + +A: Looks like a bug in the installation of mysqld. You need to reload or + restart the daemon. + reload => 'mysqladmin -u root -p reload' + restart => '/etc/init.d/mysql stop; /etc/init.d/mysql start' + +Q: How do I get my bot to automatically ask for OP's from chanserv? + +A: By default, the "chanServCheck" option is off in _default. You can + set it on a per channel basis or as default. For example, the following + commands will enable asking for OP by default, except on #notmychannel + + chanset _default chanServCheck 1 + chanset #notmychannel chanServCheck 0 diff --git a/USAGE b/USAGE new file mode 100644 index 0000000..02b60ef --- /dev/null +++ b/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/setup/mysql/news.sql b/setup/mysql/news.sql index ebfb0e2..274e656 100644 --- a/setup/mysql/news.sql +++ b/setup/mysql/news.sql @@ -1,5 +1,5 @@ CREATE TABLE news ( - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, id INT UNSIGNED DEFAULT '0', key VARCHAR(16) NOT NULL, value TEXT NOT NULL, # limit to ~450 or so. diff --git a/setup/mysql/onjoin.sql b/setup/mysql/onjoin.sql index 994cc54..d3eb6d5 100644 --- a/setup/mysql/onjoin.sql +++ b/setup/mysql/onjoin.sql @@ -1,6 +1,6 @@ CREATE TABLE onjoin ( nick VARCHAR(20) NOT NULL, - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, message VARCHAR(255) NOT NULL, modified_by VARCHAR(20) NOT NULL DEFAULT 'nobody', modified_time INT NOT NULL DEFAULT '0', diff --git a/setup/mysql/rootwarn.sql b/setup/mysql/rootwarn.sql index afcee2c..d3ea912 100644 --- a/setup/mysql/rootwarn.sql +++ b/setup/mysql/rootwarn.sql @@ -3,6 +3,6 @@ CREATE TABLE rootwarn ( attempt SMALLINT UNSIGNED, time INT NOT NULL, host VARCHAR(80) NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, PRIMARY KEY (nick) ); diff --git a/setup/mysql/seen.sql b/setup/mysql/seen.sql index d920f79..3398038 100644 --- a/setup/mysql/seen.sql +++ b/setup/mysql/seen.sql @@ -1,7 +1,7 @@ CREATE TABLE seen ( nick VARCHAR(20) NOT NULL, time INT NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, host VARCHAR(80) NOT NULL, message TINYTEXT NOT NULL, PRIMARY KEY (nick,channel) diff --git a/setup/mysql/stats.sql b/setup/mysql/stats.sql index 97f773c..d738dc0 100644 --- a/setup/mysql/stats.sql +++ b/setup/mysql/stats.sql @@ -1,7 +1,7 @@ CREATE TABLE stats ( nick VARCHAR(20) NOT NULL, type VARCHAR(8) NOT NULL, - channel VARCHAR(16) NOT NULL DEFAULT "PRIVATE", + channel VARCHAR(30) NOT NULL DEFAULT "PRIVATE", time INT UNSIGNED DEFAULT 'UNIX_TIMESTAMP()', counter SMALLINT UNSIGNED DEFAULT '0', PRIMARY KEY (nick,type,channel) diff --git a/setup/pgsql/news.sql b/setup/pgsql/news.sql index 2924c61..585785e 100644 --- a/setup/pgsql/news.sql +++ b/setup/pgsql/news.sql @@ -1,5 +1,5 @@ CREATE TABLE news ( - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, id numeric DEFAULT 0 NOT NULL, "key" VARCHAR(16) NOT NULL, value text NOT NULL diff --git a/setup/pgsql/onjoin.sql b/setup/pgsql/onjoin.sql index 2e7ed75..c590d1d 100644 --- a/setup/pgsql/onjoin.sql +++ b/setup/pgsql/onjoin.sql @@ -1,6 +1,6 @@ CREATE TABLE onjoin ( nick VARCHAR(20) NOT NULL, - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, message VARCHAR(255) NOT NULL, modified_by VARCHAR(20) DEFAULT 'nobody' NOT NULL, modified_time numeric DEFAULT 0 NOT NULL diff --git a/setup/pgsql/rootwarn.sql b/setup/pgsql/rootwarn.sql index 6a843d8..41260b7 100644 --- a/setup/pgsql/rootwarn.sql +++ b/setup/pgsql/rootwarn.sql @@ -3,7 +3,7 @@ CREATE TABLE rootwarn ( attempt numeric, "time" numeric NOT NULL, host VARCHAR(80) NOT NULL, - channel VARCHAR(20) NOT NULL + channel VARCHAR(30) NOT NULL ) WITHOUT OIDS; REVOKE ALL ON TABLE rootwarn FROM PUBLIC; diff --git a/setup/pgsql/seen.sql b/setup/pgsql/seen.sql index 550f5bf..8cf6cd1 100644 --- a/setup/pgsql/seen.sql +++ b/setup/pgsql/seen.sql @@ -1,7 +1,7 @@ CREATE TABLE seen ( nick VARCHAR(20) NOT NULL, "time" numeric NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, host VARCHAR(80) NOT NULL, message text NOT NULL, hehcount numeric DEFAULT 0 NOT NULL, diff --git a/setup/pgsql/stats.sql b/setup/pgsql/stats.sql index 4af863d..1ecd66f 100644 --- a/setup/pgsql/stats.sql +++ b/setup/pgsql/stats.sql @@ -1,7 +1,7 @@ CREATE TABLE stats ( nick VARCHAR(20) NOT NULL, "type" VARCHAR(8) NOT NULL, - channel VARCHAR(16) DEFAULT 'PRIVATE' NOT NULL, + channel VARCHAR(30) DEFAULT 'PRIVATE' NOT NULL, "time" numeric DEFAULT 0 NOT NULL, counter numeric DEFAULT 0 ) WITHOUT OIDS; diff --git a/setup/sqlite/news.sql b/setup/sqlite/news.sql index ebfb0e2..274e656 100644 --- a/setup/sqlite/news.sql +++ b/setup/sqlite/news.sql @@ -1,5 +1,5 @@ CREATE TABLE news ( - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, id INT UNSIGNED DEFAULT '0', key VARCHAR(16) NOT NULL, value TEXT NOT NULL, # limit to ~450 or so. diff --git a/setup/sqlite/onjoin.sql b/setup/sqlite/onjoin.sql index 994cc54..d3eb6d5 100644 --- a/setup/sqlite/onjoin.sql +++ b/setup/sqlite/onjoin.sql @@ -1,6 +1,6 @@ CREATE TABLE onjoin ( nick VARCHAR(20) NOT NULL, - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, message VARCHAR(255) NOT NULL, modified_by VARCHAR(20) NOT NULL DEFAULT 'nobody', modified_time INT NOT NULL DEFAULT '0', diff --git a/setup/sqlite/rootwarn.sql b/setup/sqlite/rootwarn.sql index afcee2c..d3ea912 100644 --- a/setup/sqlite/rootwarn.sql +++ b/setup/sqlite/rootwarn.sql @@ -3,6 +3,6 @@ CREATE TABLE rootwarn ( attempt SMALLINT UNSIGNED, time INT NOT NULL, host VARCHAR(80) NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, PRIMARY KEY (nick) ); diff --git a/setup/sqlite/seen.sql b/setup/sqlite/seen.sql index d920f79..3398038 100644 --- a/setup/sqlite/seen.sql +++ b/setup/sqlite/seen.sql @@ -1,7 +1,7 @@ CREATE TABLE seen ( nick VARCHAR(20) NOT NULL, time INT NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, host VARCHAR(80) NOT NULL, message TINYTEXT NOT NULL, PRIMARY KEY (nick,channel) diff --git a/setup/sqlite/stats.sql b/setup/sqlite/stats.sql index 97f773c..d738dc0 100644 --- a/setup/sqlite/stats.sql +++ b/setup/sqlite/stats.sql @@ -1,7 +1,7 @@ CREATE TABLE stats ( nick VARCHAR(20) NOT NULL, type VARCHAR(8) NOT NULL, - channel VARCHAR(16) NOT NULL DEFAULT "PRIVATE", + channel VARCHAR(30) NOT NULL DEFAULT "PRIVATE", time INT UNSIGNED DEFAULT 'UNIX_TIMESTAMP()', counter SMALLINT UNSIGNED DEFAULT '0', PRIMARY KEY (nick,type,channel) diff --git a/setup/sqlite2/news.sql b/setup/sqlite2/news.sql index ebfb0e2..274e656 100644 --- a/setup/sqlite2/news.sql +++ b/setup/sqlite2/news.sql @@ -1,5 +1,5 @@ CREATE TABLE news ( - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, id INT UNSIGNED DEFAULT '0', key VARCHAR(16) NOT NULL, value TEXT NOT NULL, # limit to ~450 or so. diff --git a/setup/sqlite2/onjoin.sql b/setup/sqlite2/onjoin.sql index 994cc54..d3eb6d5 100644 --- a/setup/sqlite2/onjoin.sql +++ b/setup/sqlite2/onjoin.sql @@ -1,6 +1,6 @@ CREATE TABLE onjoin ( nick VARCHAR(20) NOT NULL, - channel VARCHAR(16) NOT NULL, + channel VARCHAR(30) NOT NULL, message VARCHAR(255) NOT NULL, modified_by VARCHAR(20) NOT NULL DEFAULT 'nobody', modified_time INT NOT NULL DEFAULT '0', diff --git a/setup/sqlite2/rootwarn.sql b/setup/sqlite2/rootwarn.sql index afcee2c..d3ea912 100644 --- a/setup/sqlite2/rootwarn.sql +++ b/setup/sqlite2/rootwarn.sql @@ -3,6 +3,6 @@ CREATE TABLE rootwarn ( attempt SMALLINT UNSIGNED, time INT NOT NULL, host VARCHAR(80) NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, PRIMARY KEY (nick) ); diff --git a/setup/sqlite2/seen.sql b/setup/sqlite2/seen.sql index d920f79..3398038 100644 --- a/setup/sqlite2/seen.sql +++ b/setup/sqlite2/seen.sql @@ -1,7 +1,7 @@ CREATE TABLE seen ( nick VARCHAR(20) NOT NULL, time INT NOT NULL, - channel VARCHAR(20) NOT NULL, + channel VARCHAR(30) NOT NULL, host VARCHAR(80) NOT NULL, message TINYTEXT NOT NULL, PRIMARY KEY (nick,channel) diff --git a/setup/sqlite2/stats.sql b/setup/sqlite2/stats.sql index 97f773c..d738dc0 100644 --- a/setup/sqlite2/stats.sql +++ b/setup/sqlite2/stats.sql @@ -1,7 +1,7 @@ CREATE TABLE stats ( nick VARCHAR(20) NOT NULL, type VARCHAR(8) NOT NULL, - channel VARCHAR(16) NOT NULL DEFAULT "PRIVATE", + channel VARCHAR(30) NOT NULL DEFAULT "PRIVATE", time INT UNSIGNED DEFAULT 'UNIX_TIMESTAMP()', counter SMALLINT UNSIGNED DEFAULT '0', PRIMARY KEY (nick,type,channel) -- 2.39.5