Mercurial > hg > egg-tcls
diff config.tj.example @ 613:ea6ebcf42b47
TJ: Initial commit of the TJ2.0 refactoring effort. Instead of using Eggdrop
XTRA user flags for storing data, we now employ a SQLite3 database. The
database schema is probably not yet "final", so maybe beware of deploying
this script yet. Also add example configuration file and script for creating
the empty database tables.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 10 Feb 2021 11:12:13 +0200 |
parents | |
children | 20dba2c757de |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/config.tj.example Wed Feb 10 11:12:13 2021 +0200 @@ -0,0 +1,100 @@ +########################################################################## +# +# TJ script configuration +# +########################################################################## + +### +### Bind commands +### +bind pub - !tj tj_cmd_pub +bind msg - !tj tj_cmd_msg +proc tj_cmd_pub {unick uhost uhand uchan utext} { tj_cmd $unick $uhost $uhand $uchan $utext 1 } +proc tj_cmd_msg {unick uhost uhand utext} { tj_cmd $unick $uhost $uhand "" $utext 0 } + + +# Name of the command used for help texts +set tj_cmd_name "!tj" + + +# Sub-command name regexp patterns +array set tj_commands { + "help" {^(\?|help|apua)$} + "set" {^(set|aseta)$} + "remind" {^(remind|muist)} + "list" {^(list|listaa?)$} + "delete" {^(del|delete|poista)$} + "show" {^(show|näytä|nayta)$} +} + + +### +### Settings +### +# SQLite3 database +set tj_db_file "tj.sqlite" + + +# Default time (hh:mm) when not specified +set tj_default_time "12:00" + + +# Default ID for TJ +set tj_default_id "SA-INT" +set tj_default_desc "armeijapalveluksen päättyminen" + + +# Channels where TJ functionality is enabled +# set weather_channels "#foobar;#baz" +# You can use * to match substrings or everything +set tj_channels "*" + + +# 1 = Enable logging of various script actions into bot's log +# 0 = Don't. +set tj_log_enable 1 + + +# What IRC "command" should we use to send messages: +# (Valid alternatives are "PRIVMSG" and "NOTICE") +set tj_preferredmsg "PRIVMSG" + + +### +### Message texts (informal, errors, etc.) +### + +array set tj_messages { + "datefmt" "%d.%m.%Y %H:%M" + + "help_full" {"help" "help_set" "help_list"} + "help" "@cmd@ \[#id\] \[nimi\]" + "help_set" "@cmd@ set \[#id\] <\[-\]päivät \[+/-<tunnit>\] | dd.mm.yyyy \[hh:mm\]> [<kuvaus>]" + "help_list" "@cmd@ list" + + "err_invalid_user" "Pyh, mene pois." + "err_unknown_user" "en tunne @1@" + + "help_remind_add" "@cmd@ muistuta <id>" + "help_remind_delete" "@cmd@ poista <id>" + + "tj_set" "@3@:n @2@-TJ asetettu @5@ (@6@): @4@" + "tj_updated" "@3@:n @2@-TJ päivitetty @5@ (@6@): @4@" + + "tj_str_year" "vuosi" + "tj_str_years" "@1@ vuotta" + "tj_str_day" "aamu" + "tj_str_days" "@1@ aamua" + "tj_str_hour" "tunnin" + "tj_str_hours" "@1@ tuntia" + "tj_str_minute" "minuutin" + "tj_str_minutes" "@1@ minuuttia" + + "tj_str_sep" ", " + "tj_str_sep_last" " ja " + + "tj_remaining" "@1@:llä on @3@ jäljellä @2@ (@4@)." + "tj_past" "@1@ on ollut @2@-reservissä @3@ (@4@)." + + "tj_not_set" "@1@:n @2@-TJ:tä ei ole asetettu." +}