From f3940117d1ff8eb5f5312d20d12214eebf611292 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 13 Mar 2020 18:13:03 +0100 Subject: [PATCH] Rename project to soju --- README.md | 12 ++++++------ bridge.go | 2 +- cmd/{jounce => soju}/main.go | 8 ++++---- cmd/{jouncectl => sojuctl}/main.go | 10 +++++----- config/config.go | 2 +- db.go | 2 +- downstream.go | 6 +++--- go.mod | 2 +- irc.go | 2 +- ring.go | 8 ++++---- server.go | 2 +- upstream.go | 2 +- 12 files changed, 29 insertions(+), 29 deletions(-) rename cmd/{jounce => soju}/main.go (90%) rename cmd/{jouncectl => sojuctl}/main.go (86%) diff --git a/README.md b/README.md index a11df23..87bbcd1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# jounce +# soju A user-friendly IRC bouncer. @@ -10,11 +10,11 @@ A user-friendly IRC bouncer. ## Usage - sqlite3 jounce.db [options...] +const usage = `usage: sojuctl [-config path] [options...] create-user Create a new user help Show this help message @@ -40,7 +40,7 @@ func main() { cfg = config.Defaults() } - db, err := jounce.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource) + db, err := soju.OpenSQLDB(cfg.SQLDriver, cfg.SQLSource) if err != nil { log.Fatalf("failed to open database: %v", err) } @@ -65,7 +65,7 @@ func main() { log.Fatalf("failed to hash password: %v", err) } - user := jounce.User{ + user := soju.User{ Username: username, Password: string(hashed), } diff --git a/config/config.go b/config/config.go index a8e958a..9e98507 100644 --- a/config/config.go +++ b/config/config.go @@ -30,7 +30,7 @@ func Defaults() *Server { Addr: ":6667", Hostname: hostname, SQLDriver: "sqlite3", - SQLSource: "jounce.db", + SQLSource: "soju.db", } } diff --git a/db.go b/db.go index b88ebc2..fc31bb0 100644 --- a/db.go +++ b/db.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "database/sql" diff --git a/downstream.go b/downstream.go index 10069f9..7fea4f6 100644 --- a/downstream.go +++ b/downstream.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "crypto/tls" @@ -410,7 +410,7 @@ func (dc *downstreamConn) register() error { dc.SendMessage(&irc.Message{ Prefix: dc.srv.prefix(), Command: irc.RPL_WELCOME, - Params: []string{dc.nick, "Welcome to jounce, " + dc.nick}, + Params: []string{dc.nick, "Welcome to soju, " + dc.nick}, }) dc.SendMessage(&irc.Message{ Prefix: dc.srv.prefix(), @@ -425,7 +425,7 @@ func (dc *downstreamConn) register() error { dc.SendMessage(&irc.Message{ Prefix: dc.srv.prefix(), Command: irc.RPL_MYINFO, - Params: []string{dc.nick, dc.srv.Hostname, "jounce", "aiwroO", "OovaimnqpsrtklbeI"}, + Params: []string{dc.nick, dc.srv.Hostname, "soju", "aiwroO", "OovaimnqpsrtklbeI"}, }) // TODO: RPL_ISUPPORT dc.SendMessage(&irc.Message{ diff --git a/go.mod b/go.mod index 09aff4c..9d41c8c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module git.sr.ht/~emersion/jounce +module git.sr.ht/~emersion/soju go 1.13 diff --git a/irc.go b/irc.go index e4c5ae5..001c582 100644 --- a/irc.go +++ b/irc.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "fmt" diff --git a/ring.go b/ring.go index 70c6c57..9833d98 100644 --- a/ring.go +++ b/ring.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "sync" @@ -86,7 +86,7 @@ type RingConsumer struct { // diff returns the number of pending messages. It assumes the Ring is locked. func (rc *RingConsumer) diff() uint64 { if rc.cur > rc.ring.cur { - panic("jounce: consumer cursor greater than producer cursor") + panic("soju: consumer cursor greater than producer cursor") } return rc.ring.cur - rc.cur } @@ -95,7 +95,7 @@ func (rc *RingConsumer) diff() uint64 { // message is returned if no message is available. func (rc *RingConsumer) Peek() *irc.Message { if rc.closed { - panic("jounce: RingConsumer.Peek called after Close") + panic("soju: RingConsumer.Peek called after Close") } rc.ring.lock.Lock() @@ -112,7 +112,7 @@ func (rc *RingConsumer) Peek() *irc.Message { i := int(rc.cur % rc.ring.cap) msg := rc.ring.buffer[i] if msg == nil { - panic("jounce: unexpected nil ring buffer entry") + panic("soju: unexpected nil ring buffer entry") } return msg } diff --git a/server.go b/server.go index 4004c19..4a8bb3c 100644 --- a/server.go +++ b/server.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "fmt" diff --git a/upstream.go b/upstream.go index c7213bd..0c07a99 100644 --- a/upstream.go +++ b/upstream.go @@ -1,4 +1,4 @@ -package jounce +package soju import ( "crypto/tls"