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