gogs ...
This commit is contained in:
parent
7e20b957cb
commit
13379b29ea
|
@ -1,19 +1,31 @@
|
||||||
// vi:ts=4:sts=4:sw=4:noet:tw=72
|
// vi:ts=4:sts=4:sw=4:noet:tw=72
|
||||||
|
|
||||||
|
// this module will provide an interface to gogs
|
||||||
|
|
||||||
package modules
|
package modules
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/sorcix/irc"
|
"github.com/sorcix/irc"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
gogsAPIKey string
|
||||||
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
MsgHandlers["fuzzytime"] = gogsHandleMessage
|
MsgHandlers["fuzzytime"] = gogsHandleMessage
|
||||||
log.Println("Initializing gogs module")
|
log.Println("Initializing gogs module")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func gogsConfig() {
|
||||||
|
time.Sleep(5 * time.Second)
|
||||||
|
gogsAPIKey = ModParams["gogs-api-key"]
|
||||||
|
}
|
||||||
|
|
||||||
func gogsHandleMessage(m *irc.Message) {
|
func gogsHandleMessage(m *irc.Message) {
|
||||||
tok := strings.Split(m.Trailing, " ")
|
tok := strings.Split(m.Trailing, " ")
|
||||||
if len(tok) < 1 {
|
if len(tok) < 1 {
|
||||||
|
|
Loading…
Reference in New Issue