Mercurial > hg > egg-tcls
annotate config.quotedb.example @ 283:5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 23 Jan 2015 13:20:17 +0200 |
parents | e04f434b7023 |
children | 329ceff76d0c |
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 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 ### |
276 | 8 ### SQL database settings |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 ### |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
10 # Path and filename of the SQLite database |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 set qdb_file "quotedb.sqlite" |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
12 |
276 | 13 |
14 ### | |
15 ### General settings | |
16 ### | |
17 | |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
18 # Verbosity (1 = be verbose, 0 = be quiet) |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 set qdb_verbose 0 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
20 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
22 # 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
|
23 # 0 = Don't. |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
24 set qdb_logmsg 1 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
25 |
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 # 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
|
28 # (Valid alternatives are "PRIVMSG" and "NOTICE") |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
29 set qdb_preferredmsg "PRIVMSG" |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
30 |
283
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
31 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
32 ### |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
33 ### 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
|
34 ### |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
35 set qdb_max_deltime 15 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
36 set qdb_max_modtime 30 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
37 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
38 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
39 # 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
|
40 set qdb_showmax_pub 3 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
41 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
42 # Same as above, but for private message search. |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
43 set qdb_showmax_priv 5 |
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 |
276 | 46 ### |
283
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
47 ### Messages |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
48 ### |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
49 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
50 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
|
51 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
52 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
|
53 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
54 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
|
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_you_voted "Äänestit %1 -> %2" |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
57 set qdb_msg_vote_updated "Ääni päivitetty #%1 -> %2" |
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_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
|
60 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
|
61 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
62 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
|
63 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
64 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
|
65 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
|
66 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
67 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
|
68 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
|
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_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
|
71 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
72 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
|
73 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
74 |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
75 set qdb_msg_help "%1 add <teksti>|update <id> <teksti>|del <id>|find <parametrit>|vote|top3" |
5b997bee1745
quotedb: Move various message texts to configuration file. Not everything yet.
Matti Hamalainen <ccr@tnsp.org>
parents:
276
diff
changeset
|
76 |
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 ### |
276 | 79 ### Bind commands for each database etc. |
80 ### | |
81 | |
82 # Bind !quote -command for table "quotedb" | |
261
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 bind pub - !quote quote_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
84 bind msg - !quote quote_msg_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 proc quote_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!quote" "quotedb" $unick $uhost $uhand $uchan $utext 1 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
86 proc quote_msg_cmd {unick uhost uhand utext} { qdb_command "quote" "quotedb" $unick $uhost $uhand "" $utext 0 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
87 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
88 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
89 bind pub - !spede spede_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
90 bind msg - !spede spede_msg_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
91 proc spede_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
92 proc spede_msg_cmd {unick uhost uhand utext} { qdb_command "spede" "spededb" $unick $uhost $uhand "" $utext 0 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
93 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
94 bind pub - !mn mn_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
95 bind msg - !mn mn_msg_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
96 proc mn_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
97 proc mn_msg_cmd {unick uhost uhand utext} { qdb_command "mn" "mndb" $unick $uhost $uhand "" $utext 0 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
98 |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
99 bind pub - !tuksu tuksu_pub_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
100 bind msg - !tuksu tuksu_msg_cmd |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
101 proc tuksu_pub_cmd {unick uhost uhand uchan utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand $uchan $utext 1 } |
e82ae84408ca
quotedb: Move settings/config into separate file.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
102 proc tuksu_msg_cmd {unick uhost uhand utext} { qdb_command "tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 } |