+megakick
This commit is contained in:
parent
d9695fab33
commit
d9fa80796a
6
main.go
6
main.go
|
@ -122,6 +122,12 @@ func MessageHandler(Conn *xmpp.Conn, Msg *xmpp.ClientMessage) {
|
||||||
return ok
|
return ok
|
||||||
}
|
}
|
||||||
switch {
|
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
|
case f("^\\!", &Msg.Body): //any external command
|
||||||
Strip(&Msg.Body, &Msg.From)
|
Strip(&Msg.Body, &Msg.From)
|
||||||
cmd := exec.Command("bash", "-c", GetCommand(Msg.Body, Msg.From, "./plugins/"))
|
cmd := exec.Command("bash", "-c", GetCommand(Msg.Body, Msg.From, "./plugins/"))
|
||||||
|
|
Loading…
Reference in New Issue