all repos — paprika @ d2840bdca44b382498b24a8c259920bfa521fa37

go rewrite of taigabot

Rename to paprika
Anirudh Oppiliappan x@icyphox.sh
Fri, 19 Nov 2021 14:15:55 +0530
commit

d2840bdca44b382498b24a8c259920bfa521fa37

parent

8ccd2df8f599777dfee1ef536c6c23be98f1498f

M .gitignore.gitignore

@@ -1,2 +1,2 @@

-taigobot +paprika badger/
M go.modgo.mod

@@ -1,4 +1,4 @@

-module git.icyphox.sh/taigobot +module git.icyphox.sh/paprika go 1.17
M main.gomain.go

@@ -4,8 +4,8 @@ import (

"log" "net" - "git.icyphox.sh/taigobot/db" - "git.icyphox.sh/taigobot/plugins" + "git.icyphox.sh/paprika/db" + "git.icyphox.sh/paprika/plugins" "github.com/dgraph-io/badger/v3" "gopkg.in/irc.v3" )

@@ -38,10 +38,10 @@ log.Fatal(err)

} config := irc.ClientConfig{ - Nick: "taigobot112", + Nick: "paprika112", Pass: "", - User: "taigobot112", - Name: "taigobot", + User: "paprika112", + Name: "paprika", Handler: irc.HandlerFunc(ircHandler), }
M plugins/hello.goplugins/hello.go

@@ -12,7 +12,7 @@

type Hello struct{} func (Hello) Triggers() []string { - return []string{".hello", "taigobot"} + return []string{".hello", "paprika"} } func (Hello) Execute(m *irc.Message) (string, error) {
M plugins/listenbrainz.goplugins/listenbrainz.go

@@ -4,7 +4,7 @@

import ( "strings" - "git.icyphox.sh/taigobot/plugins/listenbrainz" + "git.icyphox.sh/paprika/plugins/listenbrainz" "github.com/dgraph-io/badger/v3" "gopkg.in/irc.v3" )
M plugins/listenbrainz/db.goplugins/listenbrainz/db.go

@@ -3,7 +3,7 @@

import ( "fmt" - "git.icyphox.sh/taigobot/db" + "git.icyphox.sh/paprika/db" "github.com/dgraph-io/badger/v3" )
M plugins/search.goplugins/search.go

@@ -103,7 +103,7 @@ if err != nil {

return "Client request error", err } - req.Header.Add("User-Agent", "github.com/icyphox/Taigobot") + req.Header.Add("User-Agent", "github.com/icyphox/paprika") q := req.URL.Query() q.Add("q", query)
M plugins/weather.goplugins/weather.go

@@ -4,7 +4,7 @@ import (

"fmt" "strings" - "git.icyphox.sh/taigobot/plugins/weather" + "git.icyphox.sh/paprika/plugins/weather" "gopkg.in/irc.v3" )
M plugins/weather/weather.goplugins/weather/weather.go

@@ -44,7 +44,7 @@ url = fmt.Sprintf(url, lonlat[1], lonlat[0])

client := &http.Client{} req, _ := http.NewRequest("GET", url, nil) - req.Header.Add("User-Agent", "taigobot github.com/icyphox/taigobot") + req.Header.Add("User-Agent", "github.com/icyphox/paprika") res, err := client.Do(req) if err != nil {