James Seward 12 gadi atpakaļ
vecāks
revīzija
07f5238fe9
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  1. 6 0
      QuoteEngine/QuoteEngine.tcl

+ 6 - 0
QuoteEngine/QuoteEngine.tcl

@@ -93,6 +93,12 @@ proc quote_add { nick host handle channel text } {
 		return 0
 	}
 
+	set text [string trim $text]
+	if {$text == ""} {
+		putserv "PRIVMSG $nick :You forgot the quote text :("
+		return 0
+	}
+
   set sql "INSERT INTO quotes VALUES(null, "
   append sql "'$handle', "
   append sql "'$nick!$host', "