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
* 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
--- /dev/null
+# $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
--- /dev/null
+# $Id$
+
+############
+# EXAMPLES #
+############
+
+DCC CHAT:
+.+chan #chan
+.chanset #chan +autojoin
+.chanset +autojoin
+.chanunset -autojoin
+.chanset -autojoin
+
+for list of configuration options, run:
+ ./scripts/findparam.pl
+
+
+=====
+<me> blootbot: test is testing
+<blootbot> me: okay
+<me> blootbot: testing?
+<blootbot> testing is testing
+
+<me> blootbot: tests is <REPLY> testing
+<blootbot> me: okay
+<me> blootbot: tests?
+<blootbot> testing
+
+<me> blootbot: cough is <ACTION> coughs
+<blootbot> me: okay
+<me> blootbot: cough
+* blootbot/#blootbot coughs
+
+<me> blootbot: test is <REPLY> What's (one|two|three|four|five|six)
+ times (seven|eight|nine|ten|eleven|twelve)?
+<blootbot> okay, me
+<me> blootbot: test
+<blootbot> What's four times nine?
+<me> blootbot: test?
+<blootbot> What's six times ten?
+
+<me> blootbot: op me is <ACTION> Mode change "+o $nick" on channel
+ $channel by $ident
+<blootbot> me: okay
+<me> blootbot: op me
+* blootbot/#debian-bots Mode change "+o me" on channel #blootbot by
+ blootbot
+
+<me> blootbot: no who am i is <REPLY> You are $nick!$user@$host on
+ $channel.
+<blootbot> okay, me
+<me> blootbot: who am i
+<blootbot> You are me!me@home.org on #blootbot.
+
+<me> blootbot: who last spoke is <REPLY> To my knowledge, $lastspeaker
+ was the last to say something worthwhile.
+<blootbot> me: okay
+<me> blootbot: who last spoke
+<blootbot> To my knowledge, me was the last to say something worthwhile.
+
+<me> blootbot: percentage is <REPLY> you are $randpercentage% lame
+<blootbot> me: okay
+<me> blootbot: percentage
+<blootbot> you are 79% lame
+
+<me> blootbot: slap $1 is <action> slaps $1
+<blootbot> me: okay, me
+<me> blootbot: slap Bob
+ * blootbot slaps Bob
+<me> blootbot: forget cmd: slap (.*?)
+<blootbot> 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
+ <blootbot> i am on 2 channels: #blootbot #debian
+ <blootbot> i've cached 5 users distributed over 2 channels.
+
+ > blootbot: chanstats #blootbot
+ <blootbot> On #blootbot, there have been 1 Join, 1 Op and 20
+ PublicMsgs.
+ <blootbot> 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 <nick> about <factoid>
+
+Example:
+ ...
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.
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',
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)
);
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)
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)
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
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
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;
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,
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;
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.
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',
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)
);
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)
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)
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.
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',
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)
);
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)
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)