view config.tj.example @ 628:eaf766018133

tj: If user deletes his or her default TJ ID, re-set the default to global default.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 11 Feb 2021 10:44:46 +0200
parents f0b998b1716d
children 62cf145b67f8
line wrap: on
line source

##########################################################################
#
# 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)$}
  "default" {^(def|default|vakio)$}
  "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_delete"}
  "help" "@cmd@ \[#<id>\] \[nimi\]"
  "help_set" "@cmd@ set \[#<id>\] <\[-\]päivät \[+/-<tunnit>\] | dd.mm.yyyy \[hh:mm\]> [<kuvaus>]"
  "help_list" "@cmd@ list \[nimi\] -- listaa TJ:t (muiden listaus vain admineille)"
  "help_delete" "@cmd@ del #<id> -- poistaa TJ:n annetulla ID:llä"
  "help_default" "@cmd@ def #<id> -- asettaa käyttäjän vakio TJ-ID:n"

  "help_remind_add" "@cmd@ muistuta <id>"
  "help_remind_delete" "@cmd@ poista <id>"

  "err_no_such_id" "@nick@:llä ei ole tuollaista TJ-ID:tä '@1@'."
  "err_invalid_user" "pyh, mene pois."
  "err_unknown_user" "en tunne käyttäjää @1@"

  "default_set" "@nick@:n vakio-id asetettu: '@1@'."
  "default_reset" "@nick@:n vakio-id TJ poistettu, vakio vaihdettu takaisin '@2@'."
  "items_deleted" "@nick@:n TJ '@1@' poistettu."
  "list_item" "#@1@/@2@: @3@ : \002@4@\002 / @5@"

  "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."
}