Mercurial > hg > egg-tcls
annotate config.quotedb.example @ 478:32f0aba3ab9b
quotedb: Make more things configurable.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 25 Jan 2019 14:23:36 +0200 |
parents | ac66900fd066 |
children | 4e19db35cdab |
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 | 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 | 19 |
20 ### | |
21 ### General settings | |
22 ### | |
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 | 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 | 86 ### Bind commands for each database etc. |
87 ### | |
88 | |
89 # Bind !quote -command for table "quotedb" | |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
90 bind pub - !quote quote_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
91 bind msg - !quote quote_msg_cmd |
478
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
92 proc quote_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!quote" "quotedb" $unick $uhost $uhand $uchan $utext 1 ""} |
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
93 proc quote_msg_cmd {unick uhost uhand utext} { qdb_command "!quote" "quotedb" $unick $uhost $uhand "" $utext 0 ""} |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 bind pub - !spede spede_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
97 bind msg - !spede spede_msg_cmd |
478
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
98 proc spede_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 ""} |
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
99 proc spede_msg_cmd {unick uhost uhand utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand "" $utext 0 ""} |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
101 bind pub - !mn mn_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 bind msg - !mn mn_msg_cmd |
478
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
103 proc mn_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 ""} |
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
104 proc mn_msg_cmd {unick uhost uhand utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand "" $utext 0 ""} |
261
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 - !tuksu tuksu_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
107 bind msg - !tuksu tuksu_msg_cmd |
478
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
108 proc tuksu_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand $uchan $utext 1 ""} |
32f0aba3ab9b
quotedb: Make more things configurable.
Matti Hamalainen <ccr@tnsp.org>
parents:
439
diff
changeset
|
109 proc tuksu_msg_cmd {unick uhost uhand utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 ""} |