diff --git a/.gitignore b/.gitignore index 47ffd4d..2e95737 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ debug debug.exe logbot3 logbot3.exe -vendor/ + +# Idea +/.idea diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index c08a7a9..0000000 --- a/Gopkg.lock +++ /dev/null @@ -1,26 +0,0 @@ -# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. - - -[[projects]] - branch = "master" - name = "git.aiterp.net/gisle/irc" - packages = [ - ".", - "ircutil", - "isupport", - "list" - ] - revision = "36c2a5ea38d30ba32a02add83b54c2f579e9c037" - -[[projects]] - name = "github.com/dgrijalva/jwt-go" - packages = ["."] - revision = "06ea1031745cb8b3dab3f6a236daf2b0aa468b7e" - version = "v3.2.0" - -[solve-meta] - analyzer-name = "dep" - analyzer-version = 1 - inputs-digest = "7ef4c9d0736b7eb8e596036446cae5d12a8d7485db1559cfa8ade7ba1bf74263" - solver-name = "gps-cdcl" - solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 8b75222..0000000 --- a/Gopkg.toml +++ /dev/null @@ -1,38 +0,0 @@ -# Gopkg.toml example -# -# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html -# for detailed Gopkg.toml documentation. -# -# required = ["github.com/user/thing/cmd/thing"] -# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] -# -# [[constraint]] -# name = "github.com/user/project" -# version = "1.0.0" -# -# [[constraint]] -# name = "github.com/user/project2" -# branch = "dev" -# source = "github.com/myfork/project2" -# -# [[override]] -# name = "github.com/x/y" -# version = "2.4.0" -# -# [prune] -# non-go = false -# go-tests = true -# unused-packages = true - - -[[constraint]] - branch = "master" - name = "git.aiterp.net/gisle/irc" - -[[constraint]] - name = "github.com/dgrijalva/jwt-go" - version = "3.2.0" - -[prune] - go-tests = true - unused-packages = true diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..d3da6ec --- /dev/null +++ b/go.mod @@ -0,0 +1,8 @@ +module git.aiterp.net/rpdata/logbot3 + +go 1.13 + +require ( + github.com/dgrijalva/jwt-go v3.2.0+incompatible + github.com/gissleh/irc v0.0.0-20200717144508-ec7511e0dfd4 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..3eacfaf --- /dev/null +++ b/go.sum @@ -0,0 +1,12 @@ +git.aiterp.net/gisle/irc v0.0.0-20190317212656-36c2a5ea38d3 h1:2UYpXoDYcgeIGxRX+5K2e/CK0BNAQUZ6xU/9JjQYwDk= +git.aiterp.net/gisle/irc v0.0.0-20190317212656-36c2a5ea38d3/go.mod h1:7uklwlzI0XI2O8ttooTH0suUpUmQ8Pviplg36smc1Aw= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/gissleh/irc v0.0.0-20200717144508-ec7511e0dfd4 h1:2rT4geKF5Zb0TyJjqp8ylUXwfrwIvMESdERItJtmtDI= +github.com/gissleh/irc v0.0.0-20200717144508-ec7511e0dfd4/go.mod h1:dUQ3oIxO/lK/Ga5Dq72/1tH861WBDJFkkBtbnqg6ZXc= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/internal/bot/bot.go b/internal/bot/bot.go index 5d64c80..1fa1236 100644 --- a/internal/bot/bot.go +++ b/internal/bot/bot.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "git.aiterp.net/gisle/irc" + "github.com/gissleh/irc" "git.aiterp.net/rpdata/logbot3/internal/models" "git.aiterp.net/rpdata/logbot3/internal/models/channels" ) @@ -34,6 +34,8 @@ func New(ctx context.Context, nick string, alternatives []string, user string, r SkipSSLVerification: false, }) + client.AddHandler(handler) + bot := &Bot{ client: client, channels: make(map[string]*Channel), diff --git a/internal/bot/channel.go b/internal/bot/channel.go index 6a34863..1627229 100644 --- a/internal/bot/channel.go +++ b/internal/bot/channel.go @@ -6,7 +6,7 @@ import ( "strings" "time" - "git.aiterp.net/gisle/irc" + "github.com/gissleh/irc" "git.aiterp.net/rpdata/logbot3/internal/config" "git.aiterp.net/rpdata/logbot3/internal/models/channels" "git.aiterp.net/rpdata/logbot3/internal/models/logs" diff --git a/internal/bot/handler.go b/internal/bot/handler.go index 580ea87..31607c5 100644 --- a/internal/bot/handler.go +++ b/internal/bot/handler.go @@ -5,7 +5,7 @@ import ( "os" "strings" - "git.aiterp.net/gisle/irc" + "github.com/gissleh/irc" "git.aiterp.net/rpdata/logbot3/internal/config" "git.aiterp.net/rpdata/logbot3/internal/util" ) @@ -139,6 +139,3 @@ func handler(event *irc.Event, client *irc.Client) { } } -func init() { - irc.Handle(handler) -} diff --git a/main.go b/main.go index 445e164..fbe436a 100644 --- a/main.go +++ b/main.go @@ -10,7 +10,6 @@ import ( "git.aiterp.net/rpdata/logbot3/internal/bot" "git.aiterp.net/rpdata/logbot3/internal/config" - "git.aiterp.net/rpdata/logbot3/internal/models/users" )