From 1f109203c3d4d6b912ca8d995209418511f097b2 Mon Sep 17 00:00:00 2001 From: cx uname Date: Thu, 6 Jun 2013 14:40:25 +0400 Subject: [PATCH] affiliation fix --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 8812d9f..dc613a4 100644 --- a/main.go +++ b/main.go @@ -127,6 +127,7 @@ func MessageHandler(Conn *xmpp.Conn, Msg *xmpp.ClientMessage) { } case f("^\\!", &Msg.Body): //any external command Strip(&Msg.Body, &Msg.From) + log.Println(GetCommand(Msg.Body, Msg.From, "./plugins/")) cmd := exec.Command("bash", "-c", GetCommand(Msg.Body, Msg.From, "./plugins/")) stdout, _ := cmd.StdoutPipe() stderr, _ := cmd.StderrPipe() @@ -168,7 +169,9 @@ func PresenceHandler(Conn *xmpp.Conn, Prs *xmpp.ClientPresence) { if !in(admin, Prs.From) { admin = append(admin, Prs.From) } - } else { + } + default: + if in(admin, Prs.From) { admin = del(admin, Prs.From) } }