flokati/modules/gogs.go

40 lines
557 B
Go

// vi:ts=4:sts=4:sw=4:noet:tw=72
// this module will provide an interface to gogs
package modules
import (
"strings"
"time"
"code.dnix.de/an/xlog"
"github.com/sorcix/irc"
)
var (
gogsAPIKey string
)
func init() {
MsgHandlers["gogs"] = gogsHandleMessage
xlog.Info("Gogs module initialized")
}
func gogsConfig() {
time.Sleep(5 * time.Second)
gogsAPIKey = ModParams["gogs-api-key"]
}
func gogsHandleMessage(m *irc.Message) {
tok := strings.Split(m.Trailing, " ")
if len(tok) < 1 {
return
}
switch tok[0] {
case "!gogs":
default:
}
}