rev. 02/17/2003
 Darkbot Command Listing . All Commands 

º conventions
While reading this document have in mind:
- [1], [2] and [3], are access levels for Darkbot commands.
Variables that are enclosed with < >'s (angle brackets) are mandatory; variables enclosed with [ ]'s (square brackets) are optional.
Commands are separated by a | (vertical bar (pipe) = or) meaning any off the commands can be used.
- DB (standing for DarkBot) is the nick you name your Darkbot, BotUser is you, UserABC is any other user involved in the process of the commands.
- On the examples whenever DB is answering with '*** DB blah blah' is an action; '- DB - blah blah' is a notice.
- This document is assuming that you are using the default command character of "!" (exclamation point).
- When (W)arning field appears on the command explanation means that command is not active in Windows computers or something else only related to that operating system.
-Topics are keywords that added to Darkbot database could give replies.
Since Darkbot is an ongoing project this document could change anytime, so comeback often. Above all, read the WHATSNEW document every time you download a new Darkbot revision or version.

º 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]


Administration

Nickname Change [3]
Quit IRC [3]
Raw Input
[3]
Repeat Data [3]

Restart Session [3]
Server Jump [3]
Set Channel [3]
Set Command Character [3]
Set Nickname [3]

Set userid [3]
Set Vhost [3]
Sleep (deactivate)
[3]
Wakeup [3]

Database
Management

Add Random Stuff [2]
Add Tokenized Replies [1]
Add Topic/Reply [1]
Backup Database [3]
Delete Topics [1]

Display Syntax [0]
ILC [1]
Random Topic/Replies [2]
Replace Reply [1]
Recall Topic [0]

Recall Topic NLP [0]
Search in Replies [0]
Search in Topics [0]
Tell User [0]
Variables [0]

Channel
Operation

BAN [2]
Ban List [1]
Channel Autotopic [3]
Channel Information [0]
Channel Topic [2]
Cycling Channel [2]

Delete Permban [3]
Deop User [2]
Devoice User [1]
Down (deop) BotUser [2]
Join Channel [2]
Part Channel [2]
Kick User [2]

Op User [2]
Permban User [3]
Simulate Op/Deop [2]
TEMPBAN [2]
Up (op) BotUser [2]
Voice User [1]

Status and Information

Command Character Info[0]
Code Status [0]
Database Status [0]
Joins Status [0]

Language Info [0]
Memory Status [0]
Operating System Info [0]
Permbans Info [0]
Que Status [0]

Ram Status [0]
Rundstuff Status [0]
Server Status [0]
Uptime Status [0]

User Access

Add User [3]
Delete User [3]
Join Greets [1]

Login BotUser [1]
Mask [0]
Password [1]

Seen User [0]
User's Idle Time [0]
User List [1]

Utilities

Alarm Clock [2]
Calculator [0]

Character Length [0]
Date & Time [0]
Help [0]

Ping Reply [0]
UNIXtime [0]

Commands
ABOUT
ACCESS
ADD
ADDUSER
ALARM
ALARMCLOCK
AUTOTOPIC
BACKUP
BAN
BANLIST
CALC
CHANINFO
CMDCHAR?
CYC
CYCLE
DATASEARCH
DATE
DEL
DELBAN
DELETE
DELUSER
DEOP
DEV
DEVOICE
DFIND
DIE
DISPLAY
DOWN
DSEARCH
DV
DVOICE
FIND
FORGET
HELP
HLIST
HUSH
IDLE
ILC
INFO
INFO2
J
JOIN
JOINS?
JUMP
K
KICK
L
LANG
LANGUAGE
LEAVE LENGTH
LOCATE
LOCATION?
LOGIN
LOOK
MASK
MATH
MEM
N
NAIL
NICK
OP
OS
P
PART
PASS
PASSWD
PASSWORD
PERMBAN
PERMBANS?
PING
QUE?
QUIT
RAM
RAM?
RANDOMSTUFF
RANDOMSTUFF?
RANDSTUFF
RANDSTUFF?
RAW
RDB
REHASH
REMEMBER
REMOVE
REPEAT
REPLACE
RESTART
SAVE
SEARCH
SEEN
SENDQ?
SERVER
SETCHAN
SETCHAR
SETINFO
SETNICK
SETUSER
SHITLIST
SLEEP
STORE
T
TEASEOP
TELL
TEMPBAN
TIME
TIMER
TO
TOPIC
UNIXTIME
UP
UPTIME
USERLIST
V
VARIABLES
VHOST
VOICE
WACK
WAKEUP
WHAT
WHERE
WHO


Administration

Nickname Change [3]
Changes for seconds Darkbot's current nickname to the one specified.
Command N | NICK
Syntax !NICK <newnick>
Example BotUser: !nick test123
-DB- Attempting to /nick test123
*** DB is now known as test123
*** test123 is now known as DB
Related Messages (if the user is not registered, logged in or type Darkbot's command character by mistake):
-DB- Try /nick Nick-dork.

(if no nick is specified):
-DB- Specify a nick!
See also: Set Nickname

=== top ===

Quit IRC [3]
Makes Darkbot log off IRC and shut down.
Command DIE | QUIT
Syntax !DIE
Example (with default reason):
BotUser: !die
*** Quits: DB (Killed (BotUser (cause I say so!)))

(with reason):
BotUser: !die hard
*** Quits: DB (Killed (BotUser (hard)))
Obs. 'cause I say so' is the default reason. You can specify yours instead of that one
See also: Restart Session  

=== top ===

Raw Input [3]
Instructs Darkbot to send raw information directly to the server. You can use !raw privmsg #channel or nick and !raw notice #channel or nick followed by :text
Command RAW
Syntax !RAW <data>
Example BotUser: !raw privmsg #darkbot :I'm a help robot
DB: I'm a help robot

BotUser: !raw notice #darkbot :test
-DB:#darkbot- test

=== top ===

Repeat Data [3]
Repeats a given raw input command a number of times with a delay.
Command REPEAT | TIMER
Syntax !REPEAT <number> <delay in seconds> <privmsg | notice> <nick | #channel> <:data>
Example BotUser: !repeat 3 1 privmsg #darkbot :test
DB: test
DB: test
DB: test
Related Messages (if no parameters are specified):
-DB- Syntax: REPEAT <number> <delay> <raw-data>
See also: Raw Input  

=== top ===

Restart Session [3]
Restarts Darkbot with any changes saved to the configuration.
Command REHASH | RESTART
Syntax !RESTART
Example BotUser: !restart
*** Quits: DB (Restarting Darkbot6f6 ...)
*** Joins: DB
See also: Quit IRC  

=== top ===

Server Jump [3]
Makes Darkbot switch to another IRC server.
Command JUMP | SERVER
Syntax !SERVER <irc.server> [port]
Example BotUser: !jump irc.superchat.org
*** Quits: DB (Jumping to irc.superchat.org:6667)
*** Joins: DB
Related Messages (if no parameter set):
-DB- Syntax: JUMP <server> [port]
Obs. if no port is specified DB defaults to 6667

=== top ===

Set Channel [3]
Sets the Darkbot's default channel.
Command SETCHAN
Syntax !SETCHAN <#channel>
Example BotUser: !setchan #darkbot
-DB- Default channel: #darkbot
Related Messages (if no parameter set):
-DB- Syntax: SETCHAN <new channels>

=== top ===

Set Command Character [3]
Sets Darkbot's command character (by default, it is "!").
Command SETCHAR
Syntax !SETCHAR <command_character>
Example BotUser: !setchar >
-DB- New command char now: >
Related Messages (if no parameter set):
-DB- Syntax: SETCHAR <new command char>

=== top ===

Set Nickname [3]
Changes Darkbot's default nick to the new one specified
Command SETNICK
Syntax !SETNICK <newDB>
Example BotUser: !setnick HelpBot
***  is now known as HelpBot
Related Messages (if no parameter set):
-DB- Syntax: SETNICK <newnick>

=== top ===

Set UserID [3]
Changes Darkbot's userid.
Command SETUSER
Syntax !SETUSER <userid>
Example !setuser botident
-DB- Default userid now: botident
Related Messages (if no parameter set): -DB- Syntax: SETUSER <new userid>
Obs. requires a restart

=== top ===

Set Vhost [3]
Changes Darkbot's virtual host.
Command VHOST
Syntax !VHOST <new Vhost>
Example !Vhost VirtualHost.com
-DB- Default Vhost now: VirtualHost.com
Related Messages (if no parameter set): -DB- Syntax: !VHOST <new Vhost>
Obs. requires a restart

=== top ===

Sleep (deactivate) [3]
Prevents Darkbot from listening to topic queries or commands for 120 seconds (default).
Command SLEEP | HUSH
Syntax <DB> SLEEP
Example BotUser: DB sleep
*** DB falls asleep... ZzzZZzzZZzz
Related Procedures Check defines.h file [#define SLEEP_LEVEL] if you want to change the level at which user's can make Darkbot shut up (aka hush) (default is 3)
Modify  [#define SLEEP_TIME 400] if you want to change the default sleep time from the default 400 seconds
Modify [#define GOSLEEP_ACTION "\1ACTION falls asleep... ZzzZZzzZZzz\1"] if you want to change the default message for SLEEP.
Obs. This command is useful for help channels when is necessary to make Darkbot stop 'talking' while something important is being addressed in the chan.
See also: Wakeup 

=== top ===

Wake Up (reactivate) [3]
Reactivates Darkbot after being in sleep mode.
Command WAKEUP
Syntax <DB> WAKEUP
Example BotUser: DB wakeup
*** DB wakes up from a snooze.
Related Procedures Check defines.h file [#define WAKEUP_ACTION "\1ACTION wakes up from a snooze..\1"] if you want to modify the default message for wake up.
See also: Sleep (deactivate) 

=== top ===


Database Management

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
simple topic/reply 
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
multiple word topic
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
Topic with wildcards
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 *
reply with variables
uses Darkbot's data variables
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
action reply
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
user's action reply
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 ?)
raw IRC commands reply
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)
multiple replies
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.
To add random replies 
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)