º read conventions
º You must /msg YourDarkbot login YourPassword
in order to perform any command levels [1, 2 and 3] even
if you previously did it but you or your bot rejoined the
channel]
Adding
Random Stuff |
[2] |
Adds a string of text
to be randomly displayed in the channel |
Command |
RANDOMSTUFF | RANDSTUFF
|
Syntax |
<DB> RANDOMSTUFF
<text> |
Example |
BotUser: DB randomstuff
test123
DB: BotUser, done. There are now 128
randomstuffs. |
Related Messages |
(if no randomstuff
is added): BotUser, what do you want
to add? |
Related Procedures |
Check
defines.h file [#define RANDOM_STUFF] if you want
to enable or disable RANDOM_STUFF
If you want to change the required access
level at which user's can on-line add Random Stuff (default
is 2) change in [#define RAND_LEVEL 2]
To define the time in seconds you want Darkbot
to say something in home channel when no one says anything modify
[#define RAND_IDLE] (this will override the RAND_STUFF_TIME counter
(default is 10 min). |
===
top ===
Add Topic Reply |
[1] |
Adds a topic and corresponding
reply to Darkbot's database. |
Command |
ADD | REMEMBER |
SAVE | STORE |
|
|
|
Syntax |
<DB> ADD <topic>
<reply> |
|
|
Example |
<BotUser>:
DB add test This is a simple topic and
reply
<DB>: Okay
<BotUser>: DB, test
<DB>: BotUser, This is a simple
topic and reply |
|
|
|
|
uses
'+' as words separator |
|
|
Syntax |
<DB>
ADD <topic+topic> <reply> |
|
|
Example |
<BotUser>:
DB add word1+word2 This is a multiple
word topic test
<DB>: Okay
<BotUser>: DB, word1 word2
<DB>: BotUser, This is a multiple
word topic test |
|
|
|
|
uses
'?' to substitute 1 character and '*' for
anything in that place of the word or phrase |
|
|
Syntax |
<DB>
ADD <topic|*|?> <reply> |
|
|
Example |
<BotUser>:
DB add wil?card This is a wildcard
topic example using ?
<DB>: Okay
<BotUser>: DB, wildcard
<DB>: BotUser, This is a wildcard
topic test using ?
<BotUser>: DB add *wildcard
This is a wildcard topic example using
*
<DB>: Okay
<BotUser>: DB, show me
wildcard
<DB>: BotUser, This is a wildcard
topic example using * |
|
|
|
|
|
Syntax |
<DB> ADD <topic>
<data-N~|C~|T~|B~|Q~|R~|!~|S~|P~|V~|W~|
H~|h~|t~|BAN|TEMPBAN> |
|
|
Example |
<BotUser>:
DB add variables Hi N~, welcome to C~.
I'm glad you asked now (T~) about "Q~"
as R~ witnessed. I can tell you that
I'm running V~ on server S~, port P~
and you can learn how this can be done
at W~ or by typing !~Q~ and me, B~, will
display Q~
<DB>: Okay
<BotUser>: DB, variables
<DB>: Hi BotUser, welcome to #darkbot.
I'm glad you asked now (Sun Jul 1 02:41:56
2001) about "variables" as UserABC
witnessed. I can tell you that I'm running
Darkbot 6.f.6 on server irc.superchat.org,
port 6667 and you can learn how this
can be done at http://darkbot.info
or by typing !variables and DB will display
variables |
|
|
|
|
uses a '+' right
before the reply |
|
|
Syntax |
<DB> ADD <topic>
<+><data> |
|
|
Example |
<BotUser>:
DB add test +reply with an action
<DB>: Okay
<BotUser>: DB, test
*DB reply with an action |
|
|
|
|
uses '?action' right
before the topic and '?' or '*' right after the topic to match
on those places regular IRC CTCP action sufix and prefix |
|
|
Syntax |
<DB> ADD <?><action><topic><?|*>
<reply> |
|
|
Example |
<BotUser>:
DB add ?action+test? topic
must start with ?action+ and finish with a wildcard (* or ?)
<DB>: Okay
*BotUser test
<DB>: BotUser, topic must start with ?action+ and finish
with a wildcard (* or ?) |
|
|
|
|
uses raw IRC commands
PRIVMSG, NOTICE, TOPIC,
KICK, BAN and MODE prefixed by "-" |
|
|
Syntax |
<DB> ADD <topic>
<-><Raw IRC command> <N~ | C~> <:><data> |
|
|
Example |
(full
examples/replies are not shown here, so add the
instructions and try yourself)
<BotUser>: DB add test -PRIVMSG N~ :this is a reply
using prefix '-' and IRC command PRIVMSG which sends a private
message to the user
<BotUser>: DB add test -NOTICE C~ :this is a reply using
prefix '-' and IRC command NOTICE which sends a notice to
all users in the channel
<BotUser>: DB add test -TOPIC C~ :this is a reply using
prefix '-' and IRC command TOPIC which changes channel's topic
<BotUser>: DB add test -KICK C~ N~ :this is a reply
using prefix '-' and IRC command KICK which applies a kick
to the user on the channel
<BotUser>: DB add test -BAN C~ N~ :this is a reply using
prefix '-' and IRC command BAN which applies a ban to the
user on the channel
<BotUser>: DB add test -MODE C~ :+tn (this is a reply
using prefix '-' and IRC command MODE which changes channel's
modes - needs to be defined in defines.h) (DO NOT USE THIS
COMMAND. Not active) |
|
|
|
PRIVMSG data reply
as action |
|
|
uses $char(01) right
before ACTION. To do _ type a space followed by $chr(01) and
press key TAB - delete the space afterwards |
|
|
Syntax |
<DB> ADD <topic>
<-><PRIVMSG> <N~ | C~> <$chr(01)><ACTION>
<data> |
|
|
Example |
<BotUser>:
DB add test -PRIVMSG C~ :.ACTION
(to do the code before ACTION type a space followed by $chr(01)
and press TAB. Delete the space afterwards) |
|
|
|
|
uses '|' (pipe) to
separate multiple instructions of raw IRC commands PRIVMSG,
NOTICE, TOPIC, KICK and MODE. First instruction must be prefixed
by "-" |
|
|
Syntax |
<DB> ADD <topic>
<-><Raw IRC command> <N~|C~> <:><data>
<|> <Raw IRC Command> <N~|C~> <:><data> |
|
|
Example |
<BotUser>:
DB add test -PRIVMSG C~ :1st
line needs '-' before the redirection command | PRIVMSG C~ :line2
<DB>: Okay
<BotUser>: test |
|
|
Related Messages |
(if no
topic is added):
DB: Add what, BotUser?
(if no reply is added):
DB: BotUser: What info to be added for test1?
(if already exists an entry for the topic):
DB: Sorry, there is an existing
entry under keyword test1
(if there is an error opening info2):
DB: Unable to open dat/info2.db
:( |
Related Procedures |
Check
defines.h file [#define
REQ_ACCESS_ADD] if you want to change the required user access
level to add help topics (default is 1)
The max length of each reply in info2.db (default
is 400 characters) can be changed in darkboc.c [#define MAX_DATA_SIZE
400] (if you are loading your data from ram and the replies
are all less than 400 chars you can save some ram).
You can also change the max topic
length in [#define MAX_TOPIC_SIZE] (default is 50 characters);
Modify [#define EXISTING_ENTRY "Sorry, there is an existing entry
under keyword"] if you want to change the default message for existing
entries in topics. |
See also: Replace
Reply - Recall
Topic - Delete Topic/Reply - variables
|
===
top ===
Add Tokenized Replies |
[1] |
It's a function that
makes Darkbot to pick a word out of a phrase by it's corresponding
string number. |
Command |
basically the same
commands for adding topics ADD | REMEMBER | SAVE | STORE
and tokens 1~ 2~ 3~... |
Syntax |
<DB> ADD <topic>
<reply> |
Example |
BotUser: DB ADD
darkbot* 3~ 4~ 2~ 1~
DB: Okay, BotUser :)
UserABC: Darkbot is the best
DB: the best is darkbot
BotUser: DB ADD give+me+*
+gives N~ 3~ big 4~
DB: Okay, BotUser :)
UserABC: give me a kiss
*** DB gives UserABC a big kiss |
===
top ===
Backup
Database |
[3] |
Backs up the
Darkbot database (dat/info2.db file). |
Command |
BACKUP |
Syntax |
!BACKUP |
Example |
BotUser:
!backup
DB: Backed up database. |
Obs. |
Execute
this command regularly so you have a copy of your
topics in case of any data loss |
===
top ===
Delete
Topic/Reply |
[1] |
Deletes a topic that
has been stored in Darkbot's database. |
Command |
DEL | DELETE | FORGET
| REMOVE |
Syntax |
<DB> DELETE
<topic> |
Example |
BotUser: DB delete
test123
DB: BotUser: I have deleted topic #2, test123. |
Related Messages |
if there is no topic
test123 the answer will be:
DB: BotUser: I was unable to find the topic test123. Delete
failed. |
Related Procedures |
Check
defines.h file [#define REQ_ACCESS_DEL] if you want to
change the required user access level to delete help topics
(default is 1)
Modify [#define CANT_FIND "Was
unable to find"] if you want to change the default unable to
find message. |
See also: Display
Topic Syntax - Replace
Reply |
===
top ===
Display Topic Syntax |
[0] |
Displays
the syntax of a topic's reply; also, will tell
what file is being linked to when done with Random
Topic's Replies commands |
Command |
DISPLAY |
Syntax |
<DB>DISPLAY
<topic> |
Example |
BotUser: DB display
sup
DB: Raw data for sup is: ~sup
BotUser: DB display test123
DB: Raw data for test123 is: 123 |
Obs. |
This command
is useful when you have a similar topic
such as "hi" and "hello", you don't want to waste time by making
two rdb files for each, just ask Darkbot what it's using for
one, and link it in the other. |
===
top ===
ILC |
[1] |
ILC = Is Lamer Channel.
This function is implemented to give channel helpers, operators
or IRC operators a way of having a quick and brief background
information about a given channel, as well as the date and mask
of who wrote it. (Check Obs.) |
Command |
ILC |
Syntax |
<DB>
<ADD|REMEMBER|SAVE|STORE> <ILC><+>[#]<channel>
<description> |
Example |
BotUser: DB add
ilc+#channelABC known for spamming bots.
DB: Okay BotUser :)
UserABC: ILC #channelABC
DB: UserABC, ([Thu Sep 13 08:47:40 2001] BotUser!ident@host.domain.org):
known for spamming bots. |
Related Messages |
(if there is no ILC
in Darkbot's database): 'DB: BotUser, I found no matching
ILC for that channel.' |
Obs. |
As more people is
using Darkbot for purposes other than a robot to support general
help channels, some commands can be adapted to accomplish different
tasks without the need of changing the code. It's a matter of
BotUser's imagination. For instance, because you can perform
ILC without '#' prefix, you can register information about users;
rename in your mind ILC's acronym for Identity Lamer Check and
add user information instead of channel.
Example:
BotUser: DB ADD ILC+UserABC UserXYZ did a
mass flood to #mychannel
DB: Okay BotUser :)
UserABC: ILC UserXYZ
DB: UserABC, ([Thu Sep 13 08:47:40 2001] BotUser!ident@host.domain.org):
UserXYZ did a mass flood to #mychannel |
===
top ===
Random
Topic/Replies |
[2] |
(RANDOMFILE
commands) Adds topics that give random replies. These topics
start with ~. |
Command |
basically the same
commands for managing single topics and randomstuffs plus rdb
status commands. |
Explanation |
How it works? Lets
say instead of having only one reply for each keyword (topic)
you want to have several ones. For instance, you want DB to
randomly reply to 'hi" with 'Hi Nick ;)', 'Hello Nick ;)' and
'Hey Nick ;)'. First is necessary to create a topic with the
correspondent link to the rdb file. Ex: DB add hi ~hi. (DB adds
an entry 'hi ~hi' to dat/info2.db and creates a file hi.rdb
in /dat directory). Next you need to add random replies. Ex:
'DB randstuff ~hi Hi N~ ;)', 'DB randstuff ~hi Hello N~ ;)' and 'DB
randstuff ~hi Hey N~ ;)'. (DB will add those entries in hi.rdb).
When someone writes 'Hi', DB will read from dat/info2.db which
file is linked to 'Hi' (hi ~hi = hi.rdb), picks randomly one
of the 3 entries from hi.rdb and displays it to the user. You
can link more topics to the same random reply file, display,
delete and see status of rdb files.. |
|
|
To add random
topic/files |
|
|
Commands |
ADD | REMEMBER | SAVE
| STORE |
|
Syntax |
<DB> ADD <random_topic>
<~random_link_entry) |
|
|
Example |
BotUser: DB add hi
~hi
DB: Okay, BotUser :) |
|
Related Messages |
-(if there are no
replies set for that topic):
DB: Sorry, I cannot answer that topic because DB random text
file (rdb) "dat/hi.rdb" was not found. |
|
|
|
|
Commands |
RANDSTUFF | RANDOMSTUFF |
|
Syntax |
<DB> RANDSTUFF
<~random_link_entry> <reply> |
|
|
Example |
BotUser: DB randstuff
~hi Hi N~ ;)
DB: Done, there is 1 topic under dat/hi.rdb
BotUser: DB randstuff ~hi Hello N~ ;)
DB: BotUser, done. There are now 2 randomstuffs
BotUser: DB randstuff ~hi Hey N~ ;)
DB: BotUser, done. There are now 3 randomstuffs.
(now DB replies randomly (Hi N~, Hello
N~ and Hey N~) to hi) |
|
|
|
To link
more topics to random file |
|
|
Commands |
ADD | REMEMBER | SAVE
| STORE |
|
Syntax |
<DB>
ADD <random_topic> <~random_link_entry> |
|
|
Example |
BotUser: DB
add hello ~hi
DB: Okay, BotUser :)
(now DB uses the same reply of ~hi to hello) |
|
|
|
|
Commands |
DELETE | REMOVE |
FORGET | DEL |
|
Syntax |
<DB>
DELETE <~random_link_entry> |
|
|
Example |
BotUser:
DB del ~hi
DB: I have unlinked dat/hi.rdb. |
|
Related Messages |
(if
the file doesn't exist): DB: BotUser, hi.rdb does not exist. |
|
Obs. |
This
command only removes the dat/*.rdb file. You might want to delete
also the corresponding topics-links from dat/info2.db (in this case
'hi' and 'hello'). If not, users will get the error message
"Sorry, I cannot answer that topic because DB random
text file (rdb) "dat/hi.rdb" was not found". |
|
|
|
To
display random (rdb) files -- Informs witch file is being
linked to the topic. This command is useful if you
have a similar topic an don't want to waste time by making two
rdb files for each one. Ask Darkbot what is using for one and
link it in the other. |
|
|
Commands |
DISPLAY |
|
Syntax |
<DB>
DISPLAY <random_topic> |
|
|
Example |
BotUser:
DB display hi
DB: Raw data for sup is: ~hi
BotUser: DB display hello
DB: Raw data for hello is: ~hi |
|
Related Messages |
(if there is no topic
associated with the query): DB: BotUser, I do not know
of any topic named hi. |
|
|
|
To inform
the number of rdb files in database |
|
|
Commands |
RDB |
|
Syntax |
<DB>
RDB |
|
|
Example |
BotUser: DB rdb
DB: 1 1 11 (number of files = 1 = ~hi) |
|
|
|
To inform
rdb file's creation date and author as well as linked rdb file
|
|
|
|
Syntax |
<DB> RDB <random_topic> |
|
|
Example |
BotUser:
DB rdb hi
DB: -rw-rw-r-- 1 botuser botuser 33
Nov 29 00:06 dat/hi.rdb |
|
|
Related Messages |
(if the syntax is
not correct):
DB: BotUser, rdb files are made up of letters
and or numbers, no other text is accepted.' |
Related Procedures |
Check
defines.h file [#define RAND_LEVEL 2] if you want to change
the required access level at which user's can on-line add Random
Topic Replies (default is 2) |
See also: Add Topic/Reply
- Delete Topic/Reply
- Display Topic Syntax |
===
top ===
Recall
Topic |
[0] |
Displays an
entry stored in Darkbot's
database. This is not really a command but
the main objective of Darkbot - the ability to
reply to any channel text if that text is matched
by any of the topics (keywords) stored in it's
database. |
Syntax |
<DB> <topic>
or (if GENERAL_QUESTIONS is enabled) <topic> |
Example |
BotUser: DB, test123
DB: BotUser: 123
(if GENERAL_QUESTIONS
is enabled)
BotUser: test123
DB: BotUser, 123
|
Related Messages |
(if
Darkbot's nick is mentioned but no topic specified):
DB: hmmm?
(if Darkbot don't have a reply for the query)
DB: BotUser, *shrug* |
Related Procedures |
Check
defines.h file [#define GENERAL_QUESTIONS] if you
want Darkbot to answer questions only whenDarkbot
nick is specified before the topic (not recommended) (it's enabled
by default)
Modify [#define WHUT "hmmm?"]
and [#define DONNO_Q "*shrug*"] if you want to change those
default messages. |
Obs. |
Darkbot can be triggered
when addressed in the following formats: DB, DB: DB: and DB
.... |
See also: Recall Topic Human Style
|
===
top ===
Recall
Topic human style |
[0] |
Triggers
Darkbot with an interrogative human style
sentence that begins with an interrogative adverb or pronoun
(presently who, what, where) followed by any transitory word (usually
a verb) and a topic |
Command |
WHO | WHAT | WHERE
|
Syntax |
<DB> < WHAT
| WHERE | WHO > <any_transitory_word> <topic>
|
Example |
BotUser:
DB, who is test123
DB: Last I heard, 123
BotUser: DB what is test123
DB: BotUser: rumor has it, 123
BotUser: DB, where is test123
DB: BotUser heh, 123 |
Obs. |
The use of the transitory
word is mandatory |
See also: Recall
Topic |
===
top ===
Replace Reply |
[0] |
Replaces a topic's
reply to Darkbot's database |
Command |
REPLACE |
Syntax |
<DB> REPLACE
<topic> <new_reply> |
Example |
...first
add a topic ...
BotUser: DB add test123 123
DB: Okay, BotUser :)
...
BotUser: DB replace test123 123456
DB: BotUser: I have deleted topic #7, test123.
DB: BotUser, test123 has been updated.
... now topic test123 replies 123456 instead of 123 |
Related
Messages |
(if topic not
found):
DB: I was unable to find entry: test123 |
Related Procedures |
Check
defines.h file [#define NO_ENTRY "I was unable to find
entry:"] if you want to modify the default message for no entry
found.in topics. |
See also: Add
Topic - Display
Topic Syntax - Delete Topic |
===
top ===
Search
in Topics |
[0] |
Searches
Darkbot's database for any replies that
matches the string you enter. |
Command |
FIND | LOOK | SEARCH |
Syntax |
<DB> SEARCH
<data> |
Example |
BotUser: DB search
darkbot
DB: I found one match, BotUser: darkbot |
Related Messages |
-(if no itens
found):
DB: Sorry, I don't have any entry for item_searched..
## entries searched.
-(if more than ## matches):
DB: Found more than ## matches, please narrow down your
search: (followed by the fist ## matched topics)
-(if no search string specified when used
SEARCH):
DB: What should i be searching
for, BotUser?;
-(if no search string specified when used
FIND):
DB: What am I trying to find,
BotUser? |
Related Procedures |
Check
defines.h file [#define NO_TOPIC "Sorry, I don't have any
entry for"] if you want to modify the default message for no
entry found in replies and topics.
Modify [#define TRY_FIND "What am
I trying to find"] if you want to change default message for
no entry found in replies and topics when command FIND is used.. |
See also: Search
in Replies |
===
top ===
Search
in Replies |
[0] |
Searches
Darkbot's database for any topics that
matches the string you enter. |
Command |
DATASEARCH
| DSEARCH | DFIND |
Syntax |
<DB> DSEARCH
<data> |
Example |
BotUser: DB dsearch
darkbot
DB: I found one match, BotUser: darkbot |
Related Messages |
-(if no itens
found):
DB: Sorry, I don't have any entry for item_searched..
## entries searched.
-(if more than ## matches):
DB: Found more than ## matches, please narrow down your
search: (followed by the fist ## matched topics)
-(if no search string specified):
DB: What should i be dsearching for,
BotUser? |
Related Procedures |
Check
defines.h file [#define NO_TOPIC "Sorry, I don't have any
entry for"] if you want to modify the default message for no
entry found in topics and replies. |
See also: Search
in Topics |
===
top ===
Tell
User |
[0] |
Displays a topic in
reference to the person specified |
Command |
TELL and [ABOUT]
|
Syntax |
<DB> TELL <nick>
[ABOUT] <topic> |
Example |
BotUser: DB tell UserABC
about Darkbot
DB: UserABC: Information about darkbot can be obtained at http://darkbot.net |
Related Messages |
-(if missing user
and topic):
BotUser: DB tell
DB: Tell who, BotUser?
-(if missing topic):
BotUser: DB tell UserABC
DB: BotUser: What do you want me to tell UserABC?
-(if missing topic):
BotUser: DB tell UserABC about
DB: BotUser, Tell user about what? |
Obs. |
transition word ABOUT
is facultative |
See also: Recall
Topic |
===
top ===
Variables |
[0] |
Displays
a list of variables to use with Darkbot. |
Command |
VARIABLES |
Syntax |
!VARIABLES |
Example |
BotUser: !variables
DB: BotUser, data variables are: N~ (Nick), C~
(Chan), T~ (Time/date) B~ (Botnick), Q~ (Question asked), R~
(random nick), !~ (command char), S~ (current Server), P~ (current
port) V~ (botVer), W~ (db WWW site), H~ (u@h), h~ (user's u@h without
the suffix ~ if present), t~ (unixtime), BAN (sets a ban), TEMPBAN
(bans for 60 sec) |
See also: Add Randomstuff
- Random Topic/Replies - Add Topic/Reply |
===
top ===
|
.admin
.channel
.status
.user
.utilities
home
about
help
forum
downloads
|