view config.quotedb.example @ 698:6ba9f961e463 default tip

quotedb: Bump version and copyright.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 18 Sep 2023 11:38:41 +0300
parents 14d4d4300623
children
line wrap: on
line source

##########################################################################
#
# QuoteDB script configuration
#
##########################################################################

###
### Bind commands for each database etc.
###

# Bind !quote -command for table "quotedb"
bind pub - !vitsi vitsi_cmd_pub
bind msg - !vitsi vitsi_cmd_msg
proc vitsi_cmd_pub {unick uhost uhand uchan utext} { qdb_cmd "!vitsi" "quotedb" $unick $uhost $uhand $uchan $utext 1 }
proc vitsi_cmd_msg {unick uhost uhand utext}       { qdb_cmd "!vitsi" "quotedb" $unick $uhost $uhand "" $utext 0 }
set qdb_messages(quotedb_fmt_get) "@2@ (#@1@)"
set qdb_messages(quotedb_urlprefix) ""
set qdb_messages(quotedb_name) "Vitsi"


# Bind !quote -command for table "kissa"
bind pub - !kissa kissa_cmd_pub
bind msg - !kissa kissa_cmd_msg
proc kissa_cmd_pub {unick uhost uhand uchan utext} { qdb_cmd "!kissa" "kissadb" $unick $uhost $uhand $uchan $utext 1 }
proc kissa_cmd_msg {unick uhost uhand utext}       { qdb_cmd "!kissa" "kissadb" $unick $uhost $uhand "" $utext 0 }
set qdb_messages(kissadb_fmt_get) "kissa @2@ (#@1@)"
set qdb_messages(kissadb_urlprefix) ""
set qdb_messages(kissadb_name) "Kissa"
set qdb_messages(kissadb_stats) "Kissa-tilastot: @1@ kissajuttua, @2@ äänestettyä kissamaisuutta."
set qdb_messages(kissadb_quote_does_not_exist) "Kissajuttua #@1@ ei ole olemassa."


bind pub - !spede spede_cmd_pub
bind msg - !spede spede_cmd_msg
proc spede_cmd_pub {unick uhost uhand uchan utext} { qdb_cmd "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 }
proc spede_cmd_msg {unick uhost uhand utext}       { qdb_cmd "!spede" "spededb" $unick $uhost $uhand "" $utext 0 }
set qdb_messages(spededb_urlprefix) "https://tnsp.org/spede/img/"
set qdb_messages(spededb_name) "Spede"
set qdb_messages(spededb_stats) "Spede-tilastot: @1@ spedeä, @2@ äänestettyä spedeä."
set qdb_messages(spededb_quote_does_not_exist) "Spedeä #@1@ ei ole olemassa."


bind pub - !mn mn_cmd_pub
bind msg - !mn mn_cmd_msg
proc mn_cmd_pub {unick uhost uhand uchan utext}    { qdb_cmd "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 }
proc mn_cmd_msg {unick uhost uhand utext}          { qdb_cmd "!mn" "mndb" $unick $uhost $uhand "" $utext 0 }
set qdb_messages(mndb_urlprefix) "https://tnsp.org/mndb/img/"
set qdb_messages(mndb_name) "Nykäsismi"
set qdb_messages(mndb_stats) "Nykäs-tilastot: @1@ nykäsismiä, @2@ äänestettyä."
set qdb_messages(mndb_quote_does_not_exist) "Nykäsismiä #@1@ ei ole olemassa."


bind pub - !tuksu tuksu_cmd_pub
bind msg - !tuksu tuksu_cmd_msg
proc tuksu_cmd_pub {unick uhost uhand uchan utext} { qdb_cmd "!tuksu" "tuksudb" $unick $uhost $uhand $uchan $utext 1 }
proc tuksu_cmd_msg {unick uhost uhand utext}       { qdb_cmd "!tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 }
set qdb_messages(tuksudb_urlprefix) "https://tnsp.org/tuksu/img/"
set qdb_messages(tuksudb_name) "Tuksu"
set qdb_messages(tuksudb_stats) "Tuksu-tilastot: @1@ tuksuilua, @2@ äänestettyä."
set qdb_messages(tuksudb_quote_does_not_exist) "Tuksuilua #@1@ ei ole olemassa."


###
### Settings
###
# Channels where quote functionality is enabled
# set qdb_channels "#foobar;#baz"
# You can use * to match substrings or everything
set qdb_channels "*"


# Path and filename of the SQLite database
set qdb_db_file "quotedb.sqlite"


# Verbosity (1 = be verbose, 0 = be quiet)
set qdb_verbose 0


# 1 = Enable logging of various script actions into bot's log
# 0 = Don't.
set qdb_log_enable 1


# What IRC "command" should we use to send messages:
# (Valid alternatives are "PRIVMSG" and "NOTICE")
set qdb_preferredmsg "PRIVMSG"


# Maximum time (in minutes) after quote addition
# when user is still allowed to DELETE a quote
set qdb_max_deltime 15

# Same, but for quote modification
set qdb_max_modtime 30


# Limit how many matches should the "!<cmd> find" command
# list at most  in public searches
set qdb_showmax_pub 3

# Same as above, but for private message search.
set qdb_showmax_priv 5


# Limit min/max of !quote top <n>
set qdb_toplist_min 3
set qdb_toplist_max 5


###
### Message texts (informal, errors, etc.)
###

array set qdb_messages {

  "name" "Quote"

  "invalid_user" "Pyh."

  "sql_error" "Virhe sörkittäessä @name@-tietokantaa. uliskaa."

  "fmt_get"   "#@1@: @2@ (@3@/@4@, @5@)"

  "fmt_search" "#@1@: @2@ (@3@/@4@)"
  "num_matches" "@name@-haku löysi @1@ tulosta joista max @2@ näytettiin."
  "no_matches" "@name@-haku ei tuottanut tuloksia."

  "you_voted" "Äänestit @name@ #@1@ @2@, arvosana nyt @3@"
  "vote_updated" "@name@-äänesi #@1@ päivitetty @2@, arvosana nyt @3@"
  "vote_up" "+"
  "vote_down" "-"

  "add_success" "@name@-tietokantaa sörkitty (#@1@), kiitos."

  "toplist_limit" "Top-listan määrän oltava @1@ - @2@."
  "fmt_toplist" "@1@. #@2@: @3@ (@4@, @5@)"

  "update_ok" "@name@ #@1@ päivitetty@2@."
  "update_too_old" "@name@ quote #@1@ vanhempi kuin @2@ minuuttia, ei voida päivittää."
  "update_override" " (owner/time override)"

  "quote_not_found" "@name@ #@1@ ei löydy, tai se ei kuulu käyttäjälle '@2@'."

  "stats" "@name@-tilastot: @1@ quotea, @2@ annettua ääntä."
  "stats2" "Top-@1@ lisääjät: @2@ | Viimeisimmät vuodet: @4@ | Tuottoisimmat vuodet: @6@"

  "help"           "@cmd@ <id> \002|\002 add <teksti> \002|\002 update <id> <teksti> \002|\002 del <id> \002|\002 find <parametrit> \002|\002 vote \[<id> \[1 | -1\]\] \002|\002 top <n> \002|\002 stats"

  "help_add"       "@cmd@ add <teksti>"
  "help_update"    "@cmd@ update <id> <teksti>"
  "help_delete"    "@cmd@ del <id>"
  "help_vote"      "@cmd@ vote \[\[<id>\] \[+|-\]\]"
  "help_find"      "@cmd@ find [hakuparametrit] -- \[+\]sana | -sana | %käyttäjänimi"

  "quote_deleted"  "@name@ #@1@ poistettu@2@."
  "quote_too_old"  "@name@ quote #@1@ vanhempi kuin @2@ minuuttia, ei poisteta."
  "quote_does_not_exist" "Quotea #@1@ ei ole."
}