瀏覽代碼

Always log IRC error messages.

Steve Thielemann 2 年之前
父節點
當前提交
135bde64f9
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      irc-client.go

+ 7 - 0
irc-client.go

@@ -473,6 +473,13 @@ func (Config *IRCConfig) ReaderRoutine() {
 			msg.Cmd = results[0]
 		}
 
+		if !Config.Debug_Output {
+			if msg.Cmd == "ERROR" || msg.Cmd[0] == '4' || msg.Cmd[0] == '5' {
+				// Always log errors.
+				log.Println("<<", line)
+			}
+		}
+
 		// Answer PING/PONG immediately.
 		if results[0] == "PING" {
 			Config.PriorityWrite("PONG " + results[1])