annotate config.quotedb.example @ 508:3fc74204dd8b

quotedb: Add new information in statistics sub-command.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 30 Apr 2020 23:40:03 +0300
parents 80f48fdc94fb
children cc0efa677aa9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 ##########################################################################
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 # QuoteDB script configuration
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 ##########################################################################
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6
346
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
7 # Channels where quote functionality is enabled
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
8 # set qdb_channels "#foobar;#baz"
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
9 # You can use * to match substrings or everything
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
10 set qdb_channels "*"
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
11
329ceff76d0c qdb: Add support for enabled channels.
Matti Hamalainen <ccr@tnsp.org>
parents: 283
diff changeset
12
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13 ###
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
14 ### SQL database settings
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 ###
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 # Path and filename of the SQLite database
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 set qdb_file "quotedb.sqlite"
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
19
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
20 ###
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
21 ### General settings
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
22 ###
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
23
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 # Verbosity (1 = be verbose, 0 = be quiet)
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 set qdb_verbose 0
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 # 1 = Enable logging of various script actions into bot's log
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 # 0 = Don't.
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 set qdb_logmsg 1
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 # What IRC "command" should we use to send messages:
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 # (Valid alternatives are "PRIVMSG" and "NOTICE")
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 set qdb_preferredmsg "PRIVMSG"
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
37
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
38 ###
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
39 ### Search/command related settings
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
40 ###
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 set qdb_max_deltime 15
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 set qdb_max_modtime 30
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 # Limit how many quotes should the "!<cmd> find" command show at most.
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 set qdb_showmax_pub 3
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 # Same as above, but for private message search.
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 set qdb_showmax_priv 5
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51
506
80f48fdc94fb quotedb: Add new settings and update help.
Matti Hamalainen <ccr@tnsp.org>
parents: 485
diff changeset
52 set qdb_toplist_min 2
80f48fdc94fb quotedb: Add new settings and update help.
Matti Hamalainen <ccr@tnsp.org>
parents: 485
diff changeset
53 set qdb_toplist_max 5
80f48fdc94fb quotedb: Add new settings and update help.
Matti Hamalainen <ccr@tnsp.org>
parents: 485
diff changeset
54
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
55 ###
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
56 ### Messages
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
57 ###
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
58
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
59 set qdb_msg_invalid_user "Pyh."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
60
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
61 set qdb_msg_quote_does_not_exist "Quotea #%1 ei ole."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
62
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
63 set qdb_msg_no_matches "Ei löydy!"
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
64
439
ac66900fd066 quotedb: Add display of current quote rating when voting for it.
Matti Hamalainen <ccr@tnsp.org>
parents: 346
diff changeset
65 set qdb_msg_you_voted "Äänestit #%1 -> %2, nyt yhteensä %3"
ac66900fd066 quotedb: Add display of current quote rating when voting for it.
Matti Hamalainen <ccr@tnsp.org>
parents: 346
diff changeset
66 set qdb_msg_vote_updated "Äänesi #%1 päivitetty -> %2, nyt yhteensä %3"
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
67
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
68 set qdb_msg_sql_error "Virhe sörkittäessä tietokantaa. uliskaa."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
69 set qdb_msg_add_success "Tietokantaa %1 sörkitty (#%2), kiitos."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
70
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
71 set qdb_msg_search_fmt "#%1: %2 (%3@%5)"
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
72
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
73 set qdb_msg_toplist_limit "Top-listan määrän oltava %1-%2."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
74 set qdb_msg_toplist_fmt "%1. #%2: %3 (%4, %5)"
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
75
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
76 set qdb_msg_update_override " (owner/time override)"
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
77 set qdb_msg_update_ok "%1 #%2 päivitetty%3."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
78
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
79 set qdb_msg_update_too_old "%1 quote #%2 vanhempi kuin %3 minuuttia, ei voida päivittää."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
80
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
81 set qdb_msg_not_found "%1 #%2 ei löydy, tai se ei kuulu käyttäjälle '%3'."
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
82
508
3fc74204dd8b quotedb: Add new information in statistics sub-command.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
83 set qdb_msg_stats "%1-tilastot: %2 quotea, %3 annettua ääntä. Top %4 lisääjät: %5"
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
84
508
3fc74204dd8b quotedb: Add new information in statistics sub-command.
Matti Hamalainen <ccr@tnsp.org>
parents: 506
diff changeset
85 set qdb_msg_help "%1 <id>|add <teksti>|update <id> <teksti>|del <id>|find <parametrit>|vote \[<id> \[1|-1\]\]|top <n>|stats"
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
86
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
87
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
88 ###
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
89 ### Bind commands for each database etc.
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
90 ###
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
91
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
92 # Bind !quote -command for table "quotedb"
481
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
93 bind pub - !vitsi vitsi_pub_cmd
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
94 bind msg - !vitsi vitsi_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
95 proc vitsi_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!vitsi" "quotedb" $unick $uhost $uhand $uchan $utext 1 "%2 (#%1)" ""}
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
96 proc vitsi_msg_cmd {unick uhost uhand utext} { qdb_command "!vitsi" "quotedb" $unick $uhost $uhand "" $utext 0 "%2 (#%1)" ""}
481
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
97
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
98
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
99 # Bind !quote -command for table "kissa"
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
100 bind pub - !kissa kissa_pub_cmd
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
101 bind msg - !kissa kissa_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
102 proc kissa_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!kissa" "kissadb" $unick $uhost $uhand $uchan $utext 1 "kissa %2 (#%1)" ""}
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
103 proc kissa_msg_cmd {unick uhost uhand utext} { qdb_command "!kissa" "kissadb" $unick $uhost $uhand "" $utext 0 "kissa %2 (#%1)" ""}
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 bind pub - !spede spede_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 bind msg - !spede spede_msg_cmd
485
b866ab8bd382 quotedb: Fix example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 483
diff changeset
108 proc spede_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 "" "https://tnsp.org/spede/img/"}
b866ab8bd382 quotedb: Fix example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 483
diff changeset
109 proc spede_msg_cmd {unick uhost uhand utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand "" $utext 0 "" "https://tnsp.org/spede/img/"}
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 bind pub - !mn mn_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 bind msg - !mn mn_msg_cmd
482
0e50c8440ea2 quotedb: Add img: image URL support.
Matti Hamalainen <ccr@tnsp.org>
parents: 481
diff changeset
113 proc mn_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 "" "https://tnsp.org/mndb/img/" }
0e50c8440ea2 quotedb: Add img: image URL support.
Matti Hamalainen <ccr@tnsp.org>
parents: 481
diff changeset
114 proc mn_msg_cmd {unick uhost uhand utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand "" $utext 0 "" "https://tnsp.org/mndb/img/"}
261
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 bind pub - !tuksu tuksu_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 bind msg - !tuksu tuksu_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
118 proc tuksu_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand $uchan $utext 1 "" "https://tnsp.org/tuksu/img/"}
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
119 proc tuksu_msg_cmd {unick uhost uhand utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 "" "https://tnsp.org/tuksu/img/"}