Răsfoiți Sursa

missed a shrinkspaces point

James Seward 17 ani în urmă
părinte
comite
b799f4e4e9
1 a modificat fișierele cu 8 adăugiri și 1 ștergeri
  1. 8 1
      QuoteEngine/QuoteEngine.tcl

+ 8 - 1
QuoteEngine/QuoteEngine.tcl

@@ -533,7 +533,7 @@ proc quote_version { nick host handle channel text } {
 }
 
 proc quote_auto { nick host handle channel text } {
-	global quote_automatic
+	global quote_automatic quote_shrinkspaces
 	if {$quote_automatic == 0} {
 		return
 	}
@@ -602,6 +602,13 @@ proc quote_auto { nick host handle channel text } {
 		set id [lindex $row 0]
 		set quote [lindex $row 3]
 
+		catch {
+			if {$quote_shrinkspaces == 1} {
+				regsub -all "  +" $quote " " quote
+			}
+			set quote [stripcodes bcruag $quote]
+		}
+
 		putlog "RANDOM QUOTE: $quote ($id)"
 		puthelp "PRIVMSG $channel :\[\002$id\002\] $quote"
 		set quote_auto_last($channel) [clock seconds]