Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Daniel Aberger 2016-03-05 14:00:58 +01:00
commit b682332adb
1 changed files with 38 additions and 0 deletions

38
modules/gogs.go Normal file
View File

@ -0,0 +1,38 @@
// vi:ts=4:sts=4:sw=4:noet:tw=72
// this module will provide an interface to gogs
package modules
import (
"log"
"strings"
"time"
"github.com/sorcix/irc"
)
var (
gogsAPIKey string
)
func init() {
MsgHandlers["fuzzytime"] = gogsHandleMessage
log.Println("Initializing gogs module")
}
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:
}
}