# HG changeset patch # User Matti Hamalainen # Date 1594199577 -10800 # Node ID 717a1c84df4c3c69968fe484726ecfef9ea13fa2 # Parent 21aee5c2835c3efcb1a36a6c759b4f2589b84616 quotedb: Rename qdb_command() to qdb_cmd() diff -r 21aee5c2835c -r 717a1c84df4c config.quotedb.example --- a/config.quotedb.example Wed Jul 08 01:47:38 2020 +0300 +++ b/config.quotedb.example Wed Jul 08 12:12:57 2020 +0300 @@ -11,8 +11,8 @@ # 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_command "!vitsi" "quotedb" $unick $uhost $uhand $uchan $utext 1 } -proc vitsi_cmd_msg {unick uhost uhand utext} { qdb_command "!vitsi" "quotedb" $unick $uhost $uhand "" $utext 0 } +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" @@ -21,8 +21,8 @@ # 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_command "!kissa" "kissadb" $unick $uhost $uhand $uchan $utext 1 } -proc kissa_cmd_msg {unick uhost uhand utext} { qdb_command "!kissa" "kissadb" $unick $uhost $uhand "" $utext 0 } +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" @@ -32,8 +32,8 @@ bind pub - !spede spede_cmd_pub bind msg - !spede spede_cmd_msg -proc spede_cmd_pub {unick uhost uhand uchan utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand $uchan $utext 1 } -proc spede_cmd_msg {unick uhost uhand utext} { qdb_command "!spede" "spededb" $unick $uhost $uhand "" $utext 0 } +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ä." @@ -42,8 +42,8 @@ bind pub - !mn mn_cmd_pub bind msg - !mn mn_cmd_msg -proc mn_cmd_pub {unick uhost uhand uchan utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand $uchan $utext 1 } -proc mn_cmd_msg {unick uhost uhand utext} { qdb_command "!mn" "mndb" $unick $uhost $uhand "" $utext 0 } +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ä." @@ -52,8 +52,8 @@ bind pub - !tuksu tuksu_cmd_pub bind msg - !tuksu tuksu_cmd_msg -proc tuksu_cmd_pub {unick uhost uhand uchan utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand $uchan $utext 1 } -proc tuksu_cmd_msg {unick uhost uhand utext} { qdb_command "!tuksu" "tuksudb" $unick $uhost $uhand "" $utext 0 } +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ä." diff -r 21aee5c2835c -r 717a1c84df4c quotedb.tcl --- a/quotedb.tcl Wed Jul 08 01:47:38 2020 +0300 +++ b/quotedb.tcl Wed Jul 08 12:12:57 2020 +0300 @@ -448,7 +448,7 @@ #------------------------------------------------------------------------- -proc qdb_command {ucmd utable unick uhost uhand uchan utext upublic} { +proc qdb_cmd {ucmd utable unick uhost uhand uchan utext upublic} { global qdb_channels # Check if command comes from allowed channel or is private