annotate config.quotedb.example @ 485:b866ab8bd382

quotedb: Fix example configuration.
author Matti Hamalainen <ccr@tnsp.org>
date Fri, 06 Dec 2019 11:34:50 +0200
parents 57443894bd8e
children 80f48fdc94fb
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
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
52 ###
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
53 ### Messages
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
54 ###
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
55
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
56 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
57
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
58 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
59
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
60 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
61
439
ac66900fd066 quotedb: Add display of current quote rating when voting for it.
Matti Hamalainen <ccr@tnsp.org>
parents: 346
diff changeset
62 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
63 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
64
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
65 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
66 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
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_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
69
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
70 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
71 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
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_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
74 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
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_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
77
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
78 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
79
478
32f0aba3ab9b quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents: 439
diff changeset
80 set qdb_msg_stats "%1-tilastot: %2 quotea, %3 annettua ääntä."
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
81
439
ac66900fd066 quotedb: Add display of current quote rating when voting for it.
Matti Hamalainen <ccr@tnsp.org>
parents: 346
diff changeset
82 set qdb_msg_help "%1 add <teksti>|update <id> <teksti>|del <id>|find <parametrit>|vote \[<id> <1|-1>\]|top3"
283
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
83
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
84
5b997bee1745 quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents: 276
diff changeset
85 ###
276
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
86 ### Bind commands for each database etc.
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
87 ###
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
88
e04f434b7023 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 261
diff changeset
89 # Bind !quote -command for table "quotedb"
481
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
90 bind pub - !vitsi vitsi_pub_cmd
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
91 bind msg - !vitsi vitsi_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
92 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
93 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
94
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
95
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
96 # Bind !quote -command for table "kissa"
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
97 bind pub - !kissa kissa_pub_cmd
4e19db35cdab config.quotedb.examples: Update examples.
Matti Hamalainen <ccr@tnsp.org>
parents: 478
diff changeset
98 bind msg - !kissa kissa_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
99 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
100 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
101
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 bind pub - !spede spede_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 bind msg - !spede spede_msg_cmd
485
b866ab8bd382 quotedb: Fix example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 483
diff changeset
105 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
106 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
107
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 bind pub - !mn mn_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 bind msg - !mn mn_msg_cmd
482
0e50c8440ea2 quotedb: Add img: image URL support.
Matti Hamalainen <ccr@tnsp.org>
parents: 481
diff changeset
110 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
111 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
112
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 bind pub - !tuksu tuksu_pub_cmd
e82ae84408ca quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 bind msg - !tuksu tuksu_msg_cmd
483
57443894bd8e Fixes to quotedb example configuration.
Matti Hamalainen <ccr@tnsp.org>
parents: 482
diff changeset
115 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
116 proc tuksu_msg_cmd {unick uhost uhand utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 "" "https://tnsp.org/tuksu/img/"}