瀏覽代碼

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

James Seward 20 年之前
父節點
當前提交
8023c90f7d
共有 1 個文件被更改,包括 3 次插入0 次删除
  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."
+		}
   }
 }