Mercurial > hg > egg-tcls
diff urllog.tcl @ 603:577763cb8864
urllog: Improve title handling in "URL is known" messages.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 04 Feb 2021 18:01:31 +0200 |
parents | 40db54427950 |
children | ecd8fb2b9ad3 |
line wrap: on
line diff
--- a/urllog.tcl Thu Feb 04 13:51:34 2021 +0200 +++ b/urllog.tcl Thu Feb 04 18:01:31 2021 +0200 @@ -157,10 +157,16 @@ urllog_log "URL said by $urlNick ($urlStr) already known" if {[utl_match_delim_list $urllog_pub_channels $uchan]} { + if {[string length $utitle] > 0} { + set stitle [utl_str_map_values [urllog_qm "url_known_has_title"] [list $utitle [urllog_chop_str $utitle $urllog_add_title_max]]] + } else { + set stitle [urllog_qm "url_known_no_title"] + } + if {$urllog_shorturl_enable != 0} { - urllog_verb_msg 1 $urlNick $urlChan "url_known_short" [list $uuser $uchan $uhost [utl_ctime $utime] $utitle $uurl [urllog_get_short $uid]] + urllog_verb_msg 1 $urlNick $urlChan "url_known_short" [list $uuser $uchan $uhost [utl_ctime $utime] $stitle $uurl [urllog_get_short $uid]] } else { - urllog_verb_msg 1 $urlNick $urlChan "url_known_long" [list $uuser $uchan $uhost [utl_ctime $utime] $utitle $uurl] + urllog_verb_msg 1 $urlNick $urlChan "url_known_long" [list $uuser $uchan $uhost [utl_ctime $utime] $stitle $uurl] } } return 1