From ad4276152e64067ad487a18ca99c2da491d49b45 Mon Sep 17 00:00:00 2001 From: Andreas Neue Date: Mon, 25 Jul 2016 12:17:29 +0200 Subject: [PATCH] finally ... --- server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server.go b/server.go index 3241817..30a3846 100644 --- a/server.go +++ b/server.go @@ -361,14 +361,14 @@ func handleCmdMode(sv *Server, msg *irc.Message) { if _, exists := sv.chUsers[chid]; !exists { return } - if _, exists := msg.Args[1]; !exists { + if len(msg.Args) < 2 { return } modeFlag := strings.ToLower(msg.Args[1]) - if _, exists := msg.Args[2]; !exists { - modeTar := "" + if len(msg.Args) < 3 { + //modeTar := "" } else { - modeTar := strings.ToLower(msg.Args[2]) + //modeTar := strings.ToLower(msg.Args[2]) } switch modeFlag { case "+o":