changeset 77:bae07e52591d

quotedb: Cosmetics, add some commented out examples for future, improve documentation of settings.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 11 Sep 2011 18:12:27 +0300
parents c4e10a75b868
children 2257992abd2f
files quotedb.tcl
diffstat 1 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/quotedb.tcl	Sun Sep 11 18:09:25 2011 +0300
+++ b/quotedb.tcl	Sun Sep 11 18:12:27 2011 +0300
@@ -7,6 +7,9 @@
 # send your questions and/or problems to /dev/null, thank you.
 #
 ##########################################################################
+#
+#
+##########################################################################
 
 ###
 ### General options
@@ -14,44 +17,53 @@
 # Path and filename of the SQLite database
 set qdb_file "quotedb.sqlite"
 
-# 1 = Verbose: Say messages PUBLIC when SPEDE is OK, bad, etc.
-# 0 = Quiet  : Say privately
+# Verbosity (1 = be verbose, 0 = be quiet)
 set qdb_verbose 0
 
-# 1 = Put some info to bot's Logfile when doing stuff...
+
+# 1 = Enable logging of various script actions into bot's log
 # 0 = Don't.
 set qdb_logmsg 1
 
+
 # What IRC "command" should we use to send messages:
 # (Valid alternatives are "PRIVMSG" and "NOTICE")
 set qdb_preferredmsg "PRIVMSG"
 
-
 # Foo.
 set qdb_max_deltime 15
 set qdb_max_modtime 30
 
+
 ###
 ### Search related settings
 ###
 
-# How many SPEDE's should the !spedefind command show (maximum limit)
+# Limit how many quotes should the "!<cmd> find" command show (maximum limit)
 set qdb_showmax_pub 3
 
-# For private-search, this is the default limit (user can change it)
+# Same as above, but for private message search.
 set qdb_showmax_priv 5
 
 
 ##########################################################################
 # No need to look below this line
 ##########################################################################
-#-------------------------------------------------------------------------
 set qdb_name "QuoteDB"
 set qdb_version "2.1"
 
 
 #-------------------------------------------------------------------------
 ### Binding initializations
+
+
+# EXAMPLE!
+#bind pub - !quote spede_pub_cmd
+#bind msg - quote spede_msg_cmd
+#proc quote_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!quote" "quotedb" $unick $uhost $uhand $uchan $utext 1 }
+#proc quote_msg_cmd {unick uhost uhand utext}       { qdb_command "quote" "quotedb" $unick $uhost $uhand "" $utext 0 }
+
+
 bind pub - !spede spede_pub_cmd
 bind msg - spede spede_msg_cmd
 proc spede_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 }
@@ -59,8 +71,8 @@
 
 bind pub - !mn mn_pub_cmd
 bind msg - mn mn_msg_cmd
-proc mn_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 }
-proc mn_msg_cmd {unick uhost uhand utext}       { qdb_command "mn" "mndb" $unick $uhost $uhand "" $utext 0 }
+proc mn_pub_cmd {unick uhost uhand uchan utext}    { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 }
+proc mn_msg_cmd {unick uhost uhand utext}          { qdb_command "mn" "mndb" $unick $uhost $uhand "" $utext 0 }
 
 bind pub - !tuksu tuksu_pub_cmd
 bind msg - tuksu tuksu_msg_cmd