Module loading implemented

This commit is contained in:
an 2017-06-28 13:07:36 +02:00
parent fe8343300a
commit 1968427185
1 changed files with 11 additions and 14 deletions

25
main.go
View File

@ -8,14 +8,15 @@ package main
import (
"flag"
"fmt"
"runtime"
"strings"
"time"
"code.dnix.de/an/flokatilib/modules"
"code.dnix.de/an/xlog"
//"flokatirc/version"
//"code.dnix.de/an/flokatilib/modules"
"flokatirc/version"
"github.com/42wim/matterbridge/matterclient"
)
@ -41,8 +42,7 @@ func main() {
xlog.Init(xlog.DEBUG)
//xlog.Info("%s started", SoftwareInfo())
xlog.Info("Started")
xlog.Info("%s started", SoftwareInfo())
xlog.Info("Connecting ...")
bot := matterclient.New(*name, *pass, *team, *server)
@ -53,11 +53,8 @@ func main() {
xlog.Info("Connected")
//mods := strings.Split(*modules, ",")
//TODO: implement more robust list parsing
//modules.Init(sayCh, *mods, *params)
//modules.ModParams["_nick"] = *name
modules.Init(sayCh, *mods)
modules.BotNick = *name
for {
var targets string
@ -75,7 +72,7 @@ func main() {
}
}
//func SoftwareInfo() string {
// return fmt.Sprintf("flokatirc %s-%s (built %s [%s])", version.FlokatiVersion,
// version.FlokatiBuild, version.FlokatiBuilddate, runtime.Version())
//}
func SoftwareInfo() string {
return fmt.Sprintf("flokatirc %s-%s (built %s [%s])", version.FlokatiVersion,
version.FlokatiBuild, version.FlokatiBuilddate, runtime.Version())
}