rev. 02/17/2003
 Walk Through 


Start of #darkbot_class buffer: Mon Nov 29 13:19:02 1999
12:28:07pm: <play> This is my attempt to give darkbot a
  little better documentation, I will go over how to login
  to your darkbot, how to add topics, add and delete users,
  and some of the more advanced commands that has never
  been documented before.
12:28:42pm: <play> First off, you need to get
  your darkbot online. If you're running the unix version,
  congrats, it has an easy to use ./configure script. Just
  run it, and it will walk you thru the setup.
12:29:03pm: <play> If you're using the windows
  version, just go into the dat/ dir and edit every file,
  changing what needs to be changed.
12:29:51pm: <play> Darkbot does not use the
  *!*@* hostmasking, as including the nickname is kinda
  silly. So your u@h must be in the *user@host format,
  including the *!* prefix will make the bot unable to
  match you in it's userlist. This is usually the reason
  most people can't login or set their password.
12:30:38pm: <play> Once you finish the
  configure script, it will ask you if you want to strip
  the bin, then ask if you want to launch it. If you have 
  correctly setup your u@h, the server you want the bot to
  connect to, etc, type "y" and hit enter. 
12:30:50pm: <play> your bot will now connect
  to the server you told it to, and join the channel you
  specified.
12:31:35pm: <play> In order to use your darkbot,
  you will need to set a pass. The easiest way to see if your
  u@h is correct, is to /part your channel, then /join it. If
  yourdarkbot knows you, it will message you with the syntax
  to set a password.
12:31:54pm: <play> If it does not know you, it
  will not msg you anything, in which case you'll have to fix
  your u@h setting and restart the bot.
12:32:05pm: <play> To set a pass, 
  /msg PASS 0
12:32:18pm: <play> (replacing any text within <>'s
  with data)
12:32:34pm: <play> example: if my darkbot's nickname
  is "bot", I would: 
    /msg bot pass 0 mynewsecretpass
12:32:46pm: <play> the bot will then send you a notice
  telling you your pass has been set.
12:32:59pm: <play> To login, just type: 
  /msg LOGIN
12:33:08pm: <play> example: /msg bot login mysecretpass
12:33:24pm: <play> The bot will then send you a little
  notice like this:
12:33:24pm: <play> -bot- Verified: #darkbot_class[3]
12:33:39pm: <play> the [3] part is your access level in
  that channel.
12:33:55pm: <play> Now that you are logged in, you can
  add topics to the bot.
12:34:07pm: <play> the format to add topics is: 
  ADD
12:34:13pm: <play> example:
12:34:39pm: <play> bot add test Hi there, this is a test!
12:34:39pm: <bot> Okay, play :)
12:34:52pm: <play> to get the data back out, just ask it
  about the topic:
12:34:54pm: <play> bot test
12:34:55pm: <bot> play, I heard Hi there, this is a test!
12:35:02pm: <play> you can also ask the bot with question
  marks
12:35:05pm: <play> bot test?
12:35:06pm: <bot> hmmmmm... play, Hi there, this is a test!
12:35:23pm: <play> you'll note the bot puts in a random
  prefix, if you use variables, it will not add the
  random prefix. I'll get into more detail about that later.
12:35:46pm: <play> If you left the #define GENERAL_QUESTIONS
  set to 1 (on), you can also get:
12:35:47pm: <play> test
12:35:48pm: <bot> play: rumor has it, Hi there, this is a test!
12:35:50pm: <play> and 
12:35:51pm: <play> test?
12:35:51pm: <bot> play: well, Hi there, this is a test!
12:36:14pm: <play> when addressing your darkbot, you can
  pose the question with several prefixes, and the bot
  will understand what you are asking
12:36:16pm: <play> you can go:
12:36:19pm: <play> bot what is test?
12:36:19pm: <bot> play I think Hi there, this is a test!
12:36:21pm: <play> or
12:36:28pm: <play> bot who are test?
12:36:28pm: <bot> welp... play: Hi there, this is a test!
12:36:32pm: <play> even:
12:36:37pm: <play> bot what is a test?
12:36:38pm: <bot> (play) Hi there, this is a test!
12:36:53pm: <play> darkbot has a two char variable system
12:37:06pm: <play> you can list what variables are avail
  with the !variable command
12:37:10pm: <play> !variables
12:37:11pm: <bot> play, 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)
12:37:35pm: <play> first, this is how you delete
  a topic:
12:37:37pm: <play> bot del test
12:37:38pm: <bot> play: I have deleted topic #9651, test.
12:37:53pm: <play> you can also "bot forget
12:38:03pm: <play> lets use some variables in the new test
  topic:
12:38:21pm: <play> bot add test Hi there N~, welcome to C~.
  My nick is B~, and you asked me about Q~
12:38:21pm: Okay, play :)
12:38:24pm: <play> bot test?
12:38:25pm: <bot> Hi there play, welcome to #darkbot_class.
  My nick is bot, and you asked me about test
12:38:36pm: <play> I think that is pretty self
  explanatory
12:38:47pm: <play> you can also put text directly next
  to the variables
12:38:49pm: <play> bot del test
12:38:50pm: <bot> play: I have deleted topic #9651, test.
12:39:04pm: <play> bot add test Hi there `N~`, welcome
  to ^C~^. My nick is B~, and you asked me about "Q~"
12:39:05pm: <bot> Okay, play :)
12:39:07pm: <play> bot test
12:39:07pm: <bot> Hi there `play`, welcome to ^#darkbot_class^.
  My nick is bot, and you asked me about "test"
12:39:18pm: <play> you'll note ""'s around the
  variables doesn't hurt anything.
12:39:37pm: <play> if you made a mistake in a topic,
  and want to replace it, rather than deleting then readding,
  you can use the replace command:
12:39:44pm: <play> bot replace test Hi there N~, welcome
  to C~. My nick is B~, and you asked me about Q~
12:39:45pm: <bot> play: I have deleted topic #9651, test.
12:39:45pm: <bot> play, test has been updated.
12:39:48pm: <play> test
12:39:49pm: <bot> Hi there play, welcome to #darkbot_class. My
  nick is bot, and you asked me about test
12:39:52pm: <play> :)
12:40:11pm: <play> ok, moving on...
12:40:18pm: <play> one word topics gets boring after a while.
12:40:49pm: <play> what if you wanted to add "bill clinton"
  as a topic? using bill_clinton would work, but really
  makes the bot more "bottish" than human-like, so we
  have multi-word topics
12:41:15pm: <play> basically you seperate the words in
  the same way you'd do it with html, using +'s for spaces.
12:41:30pm: <play> bot add new+test hi N~, this is a "Q~"
12:41:30pm: <bot> Okay, play :)
12:41:33pm: <play> bot new test
12:41:33pm: <bot> hi play, this is a "new test"
12:41:37pm: <play> new test
12:41:37pm: <bot> hi play, this is a "new test"
12:41:42pm: <play> it works pretty good :)
12:41:45pm: <play> bot what is a new test?
12:41:45pm: <bot> hi play, this is a "new test"
12:41:51pm: <play> bot forget new+test
12:41:52pm: <bot> play: I have deleted topic #9652, new+test.
12:42:02pm: <play> you'll always have to remember to
  include the +'s when dealing with topics.
12:42:34pm: <play> now lets say you ran a help channel
  on efnet, and got a lot of people from DALnet who keep
  asking how they can register their nicknames...
12:43:02pm: <play> the problem is, you have to know EXACT
  wording in order to match it
12:43:12pm: <play> it wouldn't be a problem if everyone
  said "how can I register my nick"
12:43:23pm: <play> because you could then add a topic
  how+can+i+register+my+nick
12:43:44pm: <play> but then most people don't talk like that,
  they all have their own syntax, and may append :)'s and
  other things
12:43:55pm: <play> the solution is to use regular IRC
  wildcards, such as ? and *'s
12:44:34pm: <play> you can assume, when someone is looking
  to register a nickname, they will say a few key words
12:44:46pm: <play> such as "how+can" and "register" and "nick"
12:44:57pm: <play> just add the topic with multi word
  topics using wildcards as seperators
12:45:16pm: <play> ie;
  bot add how+can+*+register+*+nick*
12:45:24pm: <play> that topic will now match
12:45:39pm: <play> "hey d00ds, how can I register my gr00vy 
  nickname!!!!????"
12:45:40pm: <bot> sorry play, nick registration services are not
  avaliable on Undernet. Nicks are not owned, it's first
  come, first serve.
12:46:10pm: <play> if you add smart topics like that, you'll
  be able to match just about all questions
12:46:28pm: <play> keep in mind you may have idiot friends
  who'll add topics like *e*
12:46:43pm: <play> which will then have the bot responding
  any time "e" is said in the channel.
12:47:14pm: <play> in the dat/ dir of your darkbot, by default,
  the bot will log who adds and deletes topics. You can use
  this to remove lame people you gave access to.
12:47:38pm: <play> Darkbot with all this info may be neat, but
  to be useful, you need to be able to search the database
  for data.
12:47:56pm: <play> there is two search methods in the darkbot,
  the first is to search the TOPICS, the second for the data
  under a topic.
12:47:59pm: <play> example:
12:48:03pm: <play> bot search .a
12:48:07pm: <bot> Found more than 59 matches, please narrow 
  down your search : .abk .acl .acm .acp .act .acv .ad .adb .add
  .adf .adm .adn .adp .adr .ae .af .af2 .af3 .afm .ag .ai .aif
  .al .alb .all .am .ams .an .anc .ani .ans .ao .api .app .apr
  .aps .aq .ar .arc .arj .arpa .art .as .asa .asc .asd .asf
  .asm .asp .ast .at .att .au .avi .aw .awd .az irc2.att.net 
  phoenix.az
12:48:12pm: <play> thats a lot of matches
12:48:25pm: <play> the search looks for partial text, so there
  is no wildcards
12:49:02pm: <play> the reason for that is two fold, not
  only does it already look for just partial text, but you can't
  match a wildcarded topic with a wildcarded search, at least not
  with my matching functions :)
12:49:30pm: <play> so lets say I was looking for info about a
  movie... like james bond
12:49:32pm: <play> bot search bond
12:49:32pm: <bot> Sorry, I don't have any entry for bond.. 9651
  entries searched.
12:49:38pm: <play> gosh, no luck there.
12:49:52pm: <play> bot search die
12:49:52pm: <bot> I found 8 matches, play:  die die+bot died
  diemen sandiego sandiego.ca small+soldiers soldier
12:50:13pm: <play> ok, no James bond, but someone added a
  topic for small soldiers
12:50:17pm: <play> bot small soldiers
12:50:17pm: <bot> hmmmmm... play, If you want to watch this
  movie for it's content and plot, save yourself some time
  and go watch a brick wall instead. If you want to watch it
  for it's smooth rendered graphics, also save your time,
  and go rent Toy Story again. The movie had a lame plot,
  the graphics weren't that great, and overall, you'd have
  more fun being stung in the eye by a bee.
12:50:31pm: <play> lets see if any data topics include
  james bond
12:50:34pm: <play> bot dsearch james bond
12:50:35pm: <bot> I found 3 matches, play:  007
  austin+powers+the+spy+who+sh agged+me the+world+is+not+enough
12:50:40pm: <play> 007
12:50:40pm: <bot> play James Bond 007
12:50:42pm: <play> :)
12:51:05pm: <play> Ok, next step...
12:51:23pm: <play> having the bot reply in PRIVMSG gets boring,
  sometimes you want to have the bot do more things, such as
  actions
12:51:33pm: <play> lets say someone bites your bot, and you
  wanted it to respond back
12:51:36pm: * play bites bot
12:51:36pm: * bot chews out play.
12:51:47pm: <play> the way you do that, is starting the data
  with a + prefix
12:52:03pm: <play> example
12:52:11pm: <play> bot add action+test test
12:52:11pm: <bot> Okay, play :)
12:52:14pm: <play> action test
12:52:15pm: <bot> play, I heard test
12:52:17pm: <play> thats in privmsg
12:52:22pm: <play> to do it in action back:
12:52:30pm: <play> bot replace action+test +test
12:52:31pm: <bot> play: I have deleted topic #9652, action+test.
12:52:32pm: <bot> play, action+test has been updated.
12:52:34pm: <play> action test
12:52:34pm: * bot test
12:52:40pm: <play> it now does it in action.
12:52:57pm: <play> that still doesn't explain how to match
  a user's action so the bot can action back...
12:53:09pm: <play> to do that, you'll need to start the
  topic with a ?ACTION prefix
12:53:11pm: <play> example:
12:53:33pm: <play> bot add ?action+smells+bad? +nods in agreement
12:53:33pm: <bot> Okay, play :)
12:53:37pm: * play smells bad
12:53:37pm: * bot nods in agreement
12:53:56pm: <play> the reason for the ?'s is because we're
  matching exact text, and an action is a CTCP with a /1
  prefix and suffix.
12:54:15pm: <play> rather than adding topics with control
  codes (we could if we wanted), it's easier to use the ?
  wildcard to match one char
12:54:45pm: <play> bot search ?action
12:54:46pm: <bot> I found 17 matches, play:
  ?action*+bot+a+botsnack? ?action*pokes*bot*
  ?action+*has+returned+* ?action+??
  ?action+beats+bot+in+the+head+repeatedly+with+an+a
  ?action+bites+bot? ?action+dances* ?action+eats+bot*
  ?action+fart* ?action+feeds+bot* ?action+flashes* 
  ?action+fwaps+bot* ?action+has+a+question* ?action+has+beer* 
  ?action+has+candy* ?action+hates+math? ?action+hits+bot
12:54:56pm: <play> see the ?action+dances*  topic?
12:55:20pm: <play> the reason the ending has a * instead
  of a ? is so it can match more than one text said by a user
12:55:22pm: <play> example:
12:55:25pm: * play dances
12:55:25pm: * bot gets funky with play!
12:55:28pm: <play> but also:
12:55:31pm: * play dances like a madman
12:55:31pm: * bot gets funky with play!
12:56:16pm: <play> Darkbot's most advanced topics are in
  the raw IRC format, using a '-' prefix.
12:56:20pm: <play> here is an example
12:56:26pm: <play> bot random meat pie
12:56:27pm: * bot meat pies play
12:56:28pm: * bot [}???play :)
12:56:30pm: * bot ??[}??play :O
12:56:31pm: * bot ????[}?play :(
12:56:32pm: * bot ???????*SPLAT*
12:57:02pm: <play> to do such a topic, you'll need to
  output in the raw format, first let me show you how that works,
  before getting into how to do more than out line of output per
  topic.
12:57:14pm: <play> bot replace test -PRIVMSG C~ :this is a test
12:57:15pm: <bot> play: I have deleted topic #9651, test.
12:57:16pm: <bot> play, test has been updated.
12:57:17pm: <play> test
12:57:17pm: <bot> this is a test
12:57:29pm: <play> the bot is basically sending:
  PRIVMSG #chan :this is a test
12:57:55pm: <play> raw topics that start with the - can output as
  TOPIC, NOTICE, PRIVMSG and KICK
12:58:14pm: <play> it cannot use MODE (unless you define that
  in the code) because then someone at level 1 in your bot could
  take over your channel with it.
12:58:39pm: <play> here is a more advanced raw command
12:58:55pm: <play> bot replace test -KICK C~ N~ :you asked for
  it N~!
12:58:56pm: <bot> play: I have deleted topic #9653, test.
12:58:57pm: <bot> play, test has been updated.
12:58:59pm: <play> test
12:59:00pm: *** You were kicked by bot (you asked for it play!)
12:59:00pm: *** Attempting to rejoin...
12:59:00pm: *** Rejoined channel #darkbot_class
12:59:27pm: <play> now that is all nice and good, but sometimes
  it's better to do more than just one thing at a time.
12:59:43pm: <play> lets say in your channel, saying "test" is
  a no-no, we can have the bot message the user, then kick them
  for it...
13:00:40pm: <play> basically use the pipe "|" to seperate output
13:00:49pm: <play> only the first char of the data will use the
  -, not each command.
13:00:51pm: <play> test
13:00:51pm: *** You were kicked by bot (you asked for it play!)
13:00:51pm: *** Attempting to rejoin...
13:00:51pm: *** Rejoined channel #darkbot_class
13:01:06pm: <play> bot replace test -PRIVMSG N~ :hey N~, C~
  does not allow anyone to say "Q~", thanks for your cooperation. |
  KICK C~ N~ :ERROR: bad word detected
13:01:08pm: <bot> play: I have deleted topic #9653, test.
13:01:08pm: <bot> play, test has been updated.
13:01:10pm: <play> test
13:01:11pm: *** You were kicked by bot (ERROR: bad word detected)
13:01:11pm: *** Attempting to rejoin...
13:01:11pm: *** Rejoined channel #darkbot_class
13:01:22pm: <play> *bot* hey play, #darkbot_class does not 
  allow anyone to say "test", thanks for your cooperation.
13:02:40pm: <play> if you want to see how a topic was done,
  use the DISPLAY command
13:02:55pm: <play> bot display test
13:02:55pm: <bot> Raw data for test is: -PRIVMSG N~ :hey N~, C~
  does not allow anyone to say "Q~", thanks for your cooperation. |
  KICK C~ N~ :ERROR: bad word detected
13:03:23pm: <play> here is a nice one:
13:03:25pm: <play> bot telnet localhost
13:03:26pm: <bot> Trying 127.0.0.1... 
13:03:26pm: <bot> Connected to irc1.worldnet.att.net. 
13:03:27pm: <bot> Escape character is '^]'. 
13:03:28pm: <bot> WinGate>
13:03:33pm: <play> bot display telnet+localhost
13:03:34pm: <bot> Raw data for telnet+localhost is: -PRIVMSG C~
  :Trying 127.0.0.1... | PRIVMSG C~ :Connected to
  irc1.worldnet.att.net. | PRIVMSG C~ :Escape character is '^]'.
  | PRIVMSG C~ :WinGate>
13:05:08pm: <play> while all this has been nice, and I'm
  sure gives you a lot of ideas with what to do with your darkbot,
  all topics are STATIC, they never change.
13:05:15pm: <play> one way to deal with that is with RDB topics.
13:05:17pm: <play> RDB stands for:
13:05:31pm: <play> random darkbot database
13:06:21pm: <play> here is how it works
13:07:08pm: <play> bot add a+test ~atest
13:07:08pm: <bot> Okay, play :)
13:07:11pm: <play> bot a test
13:07:11pm: <bot> Sorry, I cannot answer that topic because
  darkbot random text file (rdb) "dat/atest.rdb" was not found.
13:07:21pm: <play> basically you just start the data of the
  topic with a ~
13:07:32pm: <play> the word after the ~ will be the file used
  for the rdb.
13:07:42pm: <play> since i didn't make ~atest yet, it can't
  access it.
13:07:53pm: <play> now to add a few "random" comments
13:08:00pm: <play> bot randstuff ~atest hey there N~
13:08:00pm: <bot> Done, there is 1 topic under dat/atest.rdb
13:08:08pm: <play> bot randstuff ~atest hi N~. this is a
  random test.
13:08:10pm: <bot> play, done. There are now 2 randomstuffs.
13:08:16pm: <play> bot randstuff ~atest *caugh caugh*
13:08:16pm: <bot> play, done. There are now 3 randomstuffs.
13:08:33pm: <play> the syntax for adding to a rdb is: 
  RANDSTUFF ~
13:08:45pm: <play> now i can ask it about "a test"
13:08:47pm: <play> bot a test
13:08:47pm: <bot> hi play. this is a random test.
13:08:50pm: <play> a test
13:08:50pm: <bot> hey there play
13:08:54pm: <play> bot a test?
13:08:54pm: <bot> *caugh caugh*
13:09:05pm: <play> it picks a random line from ~atest
  and outputs it
13:09:12pm: <play> we can link several topics with
  that file
13:09:17pm: <play> bot add a+new+test ~atest
13:09:17pm: <bot> Okay, play :)
13:09:21pm: <play> a new test
13:09:22pm: <bot> hi play. this is a random test.
13:09:29pm: <play> this is good for similar topics
13:09:48pm: <play> like "hi" "hello" "sup" "lo" "allo"
  etc, link them all to a file like ~hello
13:09:54pm: <play> I've already done this
13:09:57pm: <play> bot dsearch ~hi
13:09:57pm: <bot> I found 8 matches, play:  'lo allo hello
  hello+bot hey+bot hi hi+there hiya
13:10:05pm: <play> all those files read from the ~hi rdb
13:10:17pm: <play> darkbot has a rdb command, to see how
  many rdb's I have:
13:10:18pm: <play> bot rdb
13:10:19pm: <bot>       26      26     365
13:10:22pm: <play> 26
13:10:28pm: <play> to see how big the ~hi file is:
13:10:30pm: <play> bot rdb hi
13:10:31pm: <bot> -rw-rw-r--  1 jason  user  229 Sep 22 18:37
  dat/hi.rdb
13:10:37pm: <play> 229 bytes
13:10:40pm: <play> to delete a rdb FILE (not topic), just
  delete it like a topic, but with a ~prefix, ie; bot del ~hi
13:11:49pm: <play> to add users to your bot, basically type
  !ADDUSER
13:12:07pm: <play> and it will give you the syntax, use #*
  to give access in all chans the bot is in, or #chan to give
  access in a specific channel.
13:12:25pm: <play> !DELUSER will delete a user
13:12:31pm: <play> !HLIST will list all users
13:16:53pm: <play> I hope this helps you out, and gives you
  a better idea on how to use a Darkbot. There are other commands
  I didn't go thru in this, such as UNIXTIME, but the darkbotdoc
  should cover most of those, the topics I explained here were
  explained because some of them are not easy to put in a simple
  "here is the syntax, now do it like I showed you" document.
13:18:46pm: <play> If you need additional help, or
  have questions, you can try looking for help in  
 #darkbot on irc.undernet.org
13:18:50pm: <play> The End

home
about  
help
forum
downloads