From d9fa80796ab304dceec84ea2ba22b0635b177e6a Mon Sep 17 00:00:00 2001 From: cx uname Date: Mon, 14 Jan 2013 18:26:18 +0400 Subject: [PATCH] +megakick --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index a37fb2a..065c882 100644 --- a/main.go +++ b/main.go @@ -122,6 +122,12 @@ func MessageHandler(Conn *xmpp.Conn, Msg *xmpp.ClientMessage) { return ok } switch { + case f("^\\!megakick", &Msg.Body): + s := (strings.Split(Msg.Body, "!megakick ")) + if in(admin, Msg.From) { + Conn.ModUse(room, s[1], "none", "none") + } + return case f("^\\!", &Msg.Body): //any external command Strip(&Msg.Body, &Msg.From) cmd := exec.Command("bash", "-c", GetCommand(Msg.Body, Msg.From, "./plugins/"))