Pārlūkot izejas kodu

warn users if it looks they added a quote with bad line splits

James Seward 20 gadi atpakaļ
vecāks
revīzija
8023c90f7d
1 mainītis faili ar 3 papildinājumiem un 0 dzēšanām
  1. 3 0
      QuoteEngine/QuoteEngine.tcl

+ 3 - 0
QuoteEngine/QuoteEngine.tcl

@@ -111,6 +111,9 @@ proc quote_add { nick host handle channel text } {
   } else {
     set id [mysqlinsertid $db_handle]
     puthelp "PRIVMSG $channel :Quote \002$id\002 added"
+		if [regexp {[^]> ]\|[[<0-9(]} $text] {
+			puthelp "PRIVMSG $nick :It's possible you didn't split the lines quite right on the quote you just added. For best results, split lines in quotes using '|' with a space each side. To delete the quote you just added and fix it, do '!quote del $id' in the channel."
+		}
   }
 }