# HG changeset patch # User Matti Hamalainen # Date 1445327055 -10800 # Node ID 329ceff76d0c2f66c5cb56d719fb828ee71da39c # Parent 5c6cb115a7a11c0d4be30df4112f83475265b776 qdb: Add support for enabled channels. diff -r 5c6cb115a7a1 -r 329ceff76d0c config.quotedb.example --- a/config.quotedb.example Tue Oct 20 10:43:43 2015 +0300 +++ b/config.quotedb.example Tue Oct 20 10:44:15 2015 +0300 @@ -4,6 +4,12 @@ # ########################################################################## +# Channels where quote functionality is enabled +# set qdb_channels "#foobar;#baz" +# You can use * to match substrings or everything +set qdb_channels "*" + + ### ### SQL database settings ### diff -r 5c6cb115a7a1 -r 329ceff76d0c quotedb.tcl --- a/quotedb.tcl Tue Oct 20 10:43:43 2015 +0300 +++ b/quotedb.tcl Tue Oct 20 10:44:15 2015 +0300 @@ -374,7 +374,11 @@ #------------------------------------------------------------------------- proc qdb_command {ucmd utable unick uhost uhand uchan utext upublic} { - global qdb_msg_help + global qdb_msg_help qdb_channels + + if {$upublic && ![utl_match_delim_list $qdb_channels $uchan]} { + return 0 + } set utext [string trim $utext]