ScuttleBot
fix: gofmt formatting and remove unused presenceLoop from relays
Commit
d924aea3e69d212e85d44ebb30d0a578f696b67e5057b5277d7cd7863d2883dc
Parent
5fd6783d8868e5a…
18 files changed
-17
-17
-17
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+5
-5
+7
-7
+1
+1
-1
~
cmd/claude-relay/main.go
~
cmd/codex-relay/main.go
~
cmd/gemini-relay/main.go
~
internal/api/policies.go
~
internal/bots/auditbot/auditbot.go
~
internal/bots/bridge/bridge.go
~
internal/bots/herald/herald.go
~
internal/bots/oracle/oracle.go
~
internal/bots/scribe/scribe.go
~
internal/bots/scroll/scroll.go
~
internal/bots/sentinel/sentinel.go
~
internal/bots/snitch/snitch.go
~
internal/bots/steward/steward.go
~
internal/bots/systembot/systembot.go
~
internal/bots/warden/warden.go
~
internal/registry/registry.go
~
internal/store/store.go
~
pkg/sessionrelay/irc.go
-17
| --- cmd/claude-relay/main.go | ||
| +++ cmd/claude-relay/main.go | ||
| @@ -722,27 +722,10 @@ | ||
| 722 | 722 | } |
| 723 | 723 | } |
| 724 | 724 | } |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | -func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { | |
| 728 | - if interval <= 0 { | |
| 729 | - return | |
| 730 | - } | |
| 731 | - ticker := time.NewTicker(interval) | |
| 732 | - defer ticker.Stop() | |
| 733 | - | |
| 734 | - for { | |
| 735 | - select { | |
| 736 | - case <-ctx.Done(): | |
| 737 | - return | |
| 738 | - case <-ticker.C: | |
| 739 | - _ = relay.Touch(ctx) | |
| 740 | - } | |
| 741 | - } | |
| 742 | -} | |
| 743 | - | |
| 744 | 727 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 745 | 728 | lines := make([]string, 0, len(batch)) |
| 746 | 729 | for _, msg := range batch { |
| 747 | 730 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 748 | 731 | if text == "" { |
| 749 | 732 |
| --- cmd/claude-relay/main.go | |
| +++ cmd/claude-relay/main.go | |
| @@ -722,27 +722,10 @@ | |
| 722 | } |
| 723 | } |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { |
| 728 | if interval <= 0 { |
| 729 | return |
| 730 | } |
| 731 | ticker := time.NewTicker(interval) |
| 732 | defer ticker.Stop() |
| 733 | |
| 734 | for { |
| 735 | select { |
| 736 | case <-ctx.Done(): |
| 737 | return |
| 738 | case <-ticker.C: |
| 739 | _ = relay.Touch(ctx) |
| 740 | } |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 745 | lines := make([]string, 0, len(batch)) |
| 746 | for _, msg := range batch { |
| 747 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 748 | if text == "" { |
| 749 |
| --- cmd/claude-relay/main.go | |
| +++ cmd/claude-relay/main.go | |
| @@ -722,27 +722,10 @@ | |
| 722 | } |
| 723 | } |
| 724 | } |
| 725 | } |
| 726 | |
| 727 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 728 | lines := make([]string, 0, len(batch)) |
| 729 | for _, msg := range batch { |
| 730 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 731 | if text == "" { |
| 732 |
-17
| --- cmd/codex-relay/main.go | ||
| +++ cmd/codex-relay/main.go | ||
| @@ -413,27 +413,10 @@ | ||
| 413 | 413 | } |
| 414 | 414 | } |
| 415 | 415 | } |
| 416 | 416 | } |
| 417 | 417 | |
| 418 | -func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { | |
| 419 | - if interval <= 0 { | |
| 420 | - return | |
| 421 | - } | |
| 422 | - ticker := time.NewTicker(interval) | |
| 423 | - defer ticker.Stop() | |
| 424 | - | |
| 425 | - for { | |
| 426 | - select { | |
| 427 | - case <-ctx.Done(): | |
| 428 | - return | |
| 429 | - case <-ticker.C: | |
| 430 | - _ = relay.Touch(ctx) | |
| 431 | - } | |
| 432 | - } | |
| 433 | -} | |
| 434 | - | |
| 435 | 418 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 436 | 419 | lines := make([]string, 0, len(batch)) |
| 437 | 420 | for _, msg := range batch { |
| 438 | 421 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 439 | 422 | if text == "" { |
| 440 | 423 |
| --- cmd/codex-relay/main.go | |
| +++ cmd/codex-relay/main.go | |
| @@ -413,27 +413,10 @@ | |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { |
| 419 | if interval <= 0 { |
| 420 | return |
| 421 | } |
| 422 | ticker := time.NewTicker(interval) |
| 423 | defer ticker.Stop() |
| 424 | |
| 425 | for { |
| 426 | select { |
| 427 | case <-ctx.Done(): |
| 428 | return |
| 429 | case <-ticker.C: |
| 430 | _ = relay.Touch(ctx) |
| 431 | } |
| 432 | } |
| 433 | } |
| 434 | |
| 435 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 436 | lines := make([]string, 0, len(batch)) |
| 437 | for _, msg := range batch { |
| 438 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 439 | if text == "" { |
| 440 |
| --- cmd/codex-relay/main.go | |
| +++ cmd/codex-relay/main.go | |
| @@ -413,27 +413,10 @@ | |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 419 | lines := make([]string, 0, len(batch)) |
| 420 | for _, msg := range batch { |
| 421 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 422 | if text == "" { |
| 423 |
-17
| --- cmd/gemini-relay/main.go | ||
| +++ cmd/gemini-relay/main.go | ||
| @@ -361,27 +361,10 @@ | ||
| 361 | 361 | } |
| 362 | 362 | } |
| 363 | 363 | } |
| 364 | 364 | } |
| 365 | 365 | |
| 366 | -func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { | |
| 367 | - if interval <= 0 { | |
| 368 | - return | |
| 369 | - } | |
| 370 | - ticker := time.NewTicker(interval) | |
| 371 | - defer ticker.Stop() | |
| 372 | - | |
| 373 | - for { | |
| 374 | - select { | |
| 375 | - case <-ctx.Done(): | |
| 376 | - return | |
| 377 | - case <-ticker.C: | |
| 378 | - _ = relay.Touch(ctx) | |
| 379 | - } | |
| 380 | - } | |
| 381 | -} | |
| 382 | - | |
| 383 | 366 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 384 | 367 | lines := make([]string, 0, len(batch)) |
| 385 | 368 | for _, msg := range batch { |
| 386 | 369 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 387 | 370 | if text == "" { |
| 388 | 371 |
| --- cmd/gemini-relay/main.go | |
| +++ cmd/gemini-relay/main.go | |
| @@ -361,27 +361,10 @@ | |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | func presenceLoop(ctx context.Context, relay sessionrelay.Connector, interval time.Duration) { |
| 367 | if interval <= 0 { |
| 368 | return |
| 369 | } |
| 370 | ticker := time.NewTicker(interval) |
| 371 | defer ticker.Stop() |
| 372 | |
| 373 | for { |
| 374 | select { |
| 375 | case <-ctx.Done(): |
| 376 | return |
| 377 | case <-ticker.C: |
| 378 | _ = relay.Touch(ctx) |
| 379 | } |
| 380 | } |
| 381 | } |
| 382 | |
| 383 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 384 | lines := make([]string, 0, len(batch)) |
| 385 | for _, msg := range batch { |
| 386 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 387 | if text == "" { |
| 388 |
| --- cmd/gemini-relay/main.go | |
| +++ cmd/gemini-relay/main.go | |
| @@ -361,27 +361,10 @@ | |
| 361 | } |
| 362 | } |
| 363 | } |
| 364 | } |
| 365 | |
| 366 | func injectMessages(writer io.Writer, cfg config, state *relayState, controlChannel string, batch []message) error { |
| 367 | lines := make([]string, 0, len(batch)) |
| 368 | for _, msg := range batch { |
| 369 | text := ircagent.TrimAddressedText(strings.TrimSpace(msg.Text), cfg.Nick) |
| 370 | if text == "" { |
| 371 |
+5
-5
| --- internal/api/policies.go | ||
| +++ internal/api/policies.go | ||
| @@ -25,15 +25,15 @@ | ||
| 25 | 25 | Config map[string]any `json:"config,omitempty"` |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | // AgentPolicy defines requirements applied to all registering agents. |
| 29 | 29 | type AgentPolicy struct { |
| 30 | - RequireCheckin bool `json:"require_checkin"` | |
| 31 | - CheckinChannel string `json:"checkin_channel"` | |
| 32 | - RequiredChannels []string `json:"required_channels"` | |
| 33 | - OnlineTimeoutSecs int `json:"online_timeout_secs,omitempty"` | |
| 34 | - ReapAfterDays int `json:"reap_after_days,omitempty"` | |
| 30 | + RequireCheckin bool `json:"require_checkin"` | |
| 31 | + CheckinChannel string `json:"checkin_channel"` | |
| 32 | + RequiredChannels []string `json:"required_channels"` | |
| 33 | + OnlineTimeoutSecs int `json:"online_timeout_secs,omitempty"` | |
| 34 | + ReapAfterDays int `json:"reap_after_days,omitempty"` | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | // LoggingPolicy configures message logging. |
| 38 | 38 | type LoggingPolicy struct { |
| 39 | 39 | Enabled bool `json:"enabled"` |
| 40 | 40 |
| --- internal/api/policies.go | |
| +++ internal/api/policies.go | |
| @@ -25,15 +25,15 @@ | |
| 25 | Config map[string]any `json:"config,omitempty"` |
| 26 | } |
| 27 | |
| 28 | // AgentPolicy defines requirements applied to all registering agents. |
| 29 | type AgentPolicy struct { |
| 30 | RequireCheckin bool `json:"require_checkin"` |
| 31 | CheckinChannel string `json:"checkin_channel"` |
| 32 | RequiredChannels []string `json:"required_channels"` |
| 33 | OnlineTimeoutSecs int `json:"online_timeout_secs,omitempty"` |
| 34 | ReapAfterDays int `json:"reap_after_days,omitempty"` |
| 35 | } |
| 36 | |
| 37 | // LoggingPolicy configures message logging. |
| 38 | type LoggingPolicy struct { |
| 39 | Enabled bool `json:"enabled"` |
| 40 |
| --- internal/api/policies.go | |
| +++ internal/api/policies.go | |
| @@ -25,15 +25,15 @@ | |
| 25 | Config map[string]any `json:"config,omitempty"` |
| 26 | } |
| 27 | |
| 28 | // AgentPolicy defines requirements applied to all registering agents. |
| 29 | type AgentPolicy struct { |
| 30 | RequireCheckin bool `json:"require_checkin"` |
| 31 | CheckinChannel string `json:"checkin_channel"` |
| 32 | RequiredChannels []string `json:"required_channels"` |
| 33 | OnlineTimeoutSecs int `json:"online_timeout_secs,omitempty"` |
| 34 | ReapAfterDays int `json:"reap_after_days,omitempty"` |
| 35 | } |
| 36 | |
| 37 | // LoggingPolicy configures message logging. |
| 38 | type LoggingPolicy struct { |
| 39 | Enabled bool `json:"enabled"` |
| 40 |
| --- internal/bots/auditbot/auditbot.go | ||
| +++ internal/bots/auditbot/auditbot.go | ||
| @@ -102,15 +102,15 @@ | ||
| 102 | 102 | if err != nil { |
| 103 | 103 | return fmt.Errorf("auditbot: parse irc addr: %w", err) |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | c := girc.New(girc.Config{ |
| 107 | - Server: host, | |
| 108 | - Port: port, | |
| 109 | - Nick: botNick, | |
| 110 | - User: botNick, | |
| 111 | - Name: "scuttlebot auditbot", | |
| 107 | + Server: host, | |
| 108 | + Port: port, | |
| 109 | + Nick: botNick, | |
| 110 | + User: botNick, | |
| 111 | + Name: "scuttlebot auditbot", | |
| 112 | 112 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 113 | 113 | PingDelay: 30 * time.Second, |
| 114 | 114 | PingTimeout: 30 * time.Second, |
| 115 | 115 | SSL: false, |
| 116 | 116 | }) |
| 117 | 117 |
| --- internal/bots/auditbot/auditbot.go | |
| +++ internal/bots/auditbot/auditbot.go | |
| @@ -102,15 +102,15 @@ | |
| 102 | if err != nil { |
| 103 | return fmt.Errorf("auditbot: parse irc addr: %w", err) |
| 104 | } |
| 105 | |
| 106 | c := girc.New(girc.Config{ |
| 107 | Server: host, |
| 108 | Port: port, |
| 109 | Nick: botNick, |
| 110 | User: botNick, |
| 111 | Name: "scuttlebot auditbot", |
| 112 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 113 | PingDelay: 30 * time.Second, |
| 114 | PingTimeout: 30 * time.Second, |
| 115 | SSL: false, |
| 116 | }) |
| 117 |
| --- internal/bots/auditbot/auditbot.go | |
| +++ internal/bots/auditbot/auditbot.go | |
| @@ -102,15 +102,15 @@ | |
| 102 | if err != nil { |
| 103 | return fmt.Errorf("auditbot: parse irc addr: %w", err) |
| 104 | } |
| 105 | |
| 106 | c := girc.New(girc.Config{ |
| 107 | Server: host, |
| 108 | Port: port, |
| 109 | Nick: botNick, |
| 110 | User: botNick, |
| 111 | Name: "scuttlebot auditbot", |
| 112 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 113 | PingDelay: 30 * time.Second, |
| 114 | PingTimeout: 30 * time.Second, |
| 115 | SSL: false, |
| 116 | }) |
| 117 |
+5
-5
| --- internal/bots/bridge/bridge.go | ||
| +++ internal/bots/bridge/bridge.go | ||
| @@ -151,15 +151,15 @@ | ||
| 151 | 151 | if err != nil { |
| 152 | 152 | return fmt.Errorf("bridge: parse irc addr: %w", err) |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | 155 | c := girc.New(girc.Config{ |
| 156 | - Server: host, | |
| 157 | - Port: port, | |
| 158 | - Nick: b.nick, | |
| 159 | - User: b.nick, | |
| 160 | - Name: "scuttlebot bridge", | |
| 156 | + Server: host, | |
| 157 | + Port: port, | |
| 158 | + Nick: b.nick, | |
| 159 | + User: b.nick, | |
| 160 | + Name: "scuttlebot bridge", | |
| 161 | 161 | SASL: &girc.SASLPlain{User: b.nick, Pass: b.password}, |
| 162 | 162 | PingDelay: 30 * time.Second, |
| 163 | 163 | PingTimeout: 30 * time.Second, |
| 164 | 164 | SSL: false, |
| 165 | 165 | }) |
| 166 | 166 |
| --- internal/bots/bridge/bridge.go | |
| +++ internal/bots/bridge/bridge.go | |
| @@ -151,15 +151,15 @@ | |
| 151 | if err != nil { |
| 152 | return fmt.Errorf("bridge: parse irc addr: %w", err) |
| 153 | } |
| 154 | |
| 155 | c := girc.New(girc.Config{ |
| 156 | Server: host, |
| 157 | Port: port, |
| 158 | Nick: b.nick, |
| 159 | User: b.nick, |
| 160 | Name: "scuttlebot bridge", |
| 161 | SASL: &girc.SASLPlain{User: b.nick, Pass: b.password}, |
| 162 | PingDelay: 30 * time.Second, |
| 163 | PingTimeout: 30 * time.Second, |
| 164 | SSL: false, |
| 165 | }) |
| 166 |
| --- internal/bots/bridge/bridge.go | |
| +++ internal/bots/bridge/bridge.go | |
| @@ -151,15 +151,15 @@ | |
| 151 | if err != nil { |
| 152 | return fmt.Errorf("bridge: parse irc addr: %w", err) |
| 153 | } |
| 154 | |
| 155 | c := girc.New(girc.Config{ |
| 156 | Server: host, |
| 157 | Port: port, |
| 158 | Nick: b.nick, |
| 159 | User: b.nick, |
| 160 | Name: "scuttlebot bridge", |
| 161 | SASL: &girc.SASLPlain{User: b.nick, Pass: b.password}, |
| 162 | PingDelay: 30 * time.Second, |
| 163 | PingTimeout: 30 * time.Second, |
| 164 | SSL: false, |
| 165 | }) |
| 166 |
+5
-5
| --- internal/bots/herald/herald.go | ||
| +++ internal/bots/herald/herald.go | ||
| @@ -137,15 +137,15 @@ | ||
| 137 | 137 | if err != nil { |
| 138 | 138 | return fmt.Errorf("herald: parse irc addr: %w", err) |
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | c := girc.New(girc.Config{ |
| 142 | - Server: host, | |
| 143 | - Port: port, | |
| 144 | - Nick: botNick, | |
| 145 | - User: botNick, | |
| 146 | - Name: "scuttlebot herald", | |
| 142 | + Server: host, | |
| 143 | + Port: port, | |
| 144 | + Nick: botNick, | |
| 145 | + User: botNick, | |
| 146 | + Name: "scuttlebot herald", | |
| 147 | 147 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 148 | 148 | PingDelay: 30 * time.Second, |
| 149 | 149 | PingTimeout: 30 * time.Second, |
| 150 | 150 | SSL: false, |
| 151 | 151 | }) |
| 152 | 152 |
| --- internal/bots/herald/herald.go | |
| +++ internal/bots/herald/herald.go | |
| @@ -137,15 +137,15 @@ | |
| 137 | if err != nil { |
| 138 | return fmt.Errorf("herald: parse irc addr: %w", err) |
| 139 | } |
| 140 | |
| 141 | c := girc.New(girc.Config{ |
| 142 | Server: host, |
| 143 | Port: port, |
| 144 | Nick: botNick, |
| 145 | User: botNick, |
| 146 | Name: "scuttlebot herald", |
| 147 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 148 | PingDelay: 30 * time.Second, |
| 149 | PingTimeout: 30 * time.Second, |
| 150 | SSL: false, |
| 151 | }) |
| 152 |
| --- internal/bots/herald/herald.go | |
| +++ internal/bots/herald/herald.go | |
| @@ -137,15 +137,15 @@ | |
| 137 | if err != nil { |
| 138 | return fmt.Errorf("herald: parse irc addr: %w", err) |
| 139 | } |
| 140 | |
| 141 | c := girc.New(girc.Config{ |
| 142 | Server: host, |
| 143 | Port: port, |
| 144 | Nick: botNick, |
| 145 | User: botNick, |
| 146 | Name: "scuttlebot herald", |
| 147 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 148 | PingDelay: 30 * time.Second, |
| 149 | PingTimeout: 30 * time.Second, |
| 150 | SSL: false, |
| 151 | }) |
| 152 |
+5
-5
| --- internal/bots/oracle/oracle.go | ||
| +++ internal/bots/oracle/oracle.go | ||
| @@ -148,15 +148,15 @@ | ||
| 148 | 148 | if err != nil { |
| 149 | 149 | return fmt.Errorf("oracle: parse irc addr: %w", err) |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | c := girc.New(girc.Config{ |
| 153 | - Server: host, | |
| 154 | - Port: port, | |
| 155 | - Nick: botNick, | |
| 156 | - User: botNick, | |
| 157 | - Name: "scuttlebot oracle", | |
| 153 | + Server: host, | |
| 154 | + Port: port, | |
| 155 | + Nick: botNick, | |
| 156 | + User: botNick, | |
| 157 | + Name: "scuttlebot oracle", | |
| 158 | 158 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 159 | 159 | PingDelay: 30 * time.Second, |
| 160 | 160 | PingTimeout: 30 * time.Second, |
| 161 | 161 | SSL: false, |
| 162 | 162 | }) |
| 163 | 163 |
| --- internal/bots/oracle/oracle.go | |
| +++ internal/bots/oracle/oracle.go | |
| @@ -148,15 +148,15 @@ | |
| 148 | if err != nil { |
| 149 | return fmt.Errorf("oracle: parse irc addr: %w", err) |
| 150 | } |
| 151 | |
| 152 | c := girc.New(girc.Config{ |
| 153 | Server: host, |
| 154 | Port: port, |
| 155 | Nick: botNick, |
| 156 | User: botNick, |
| 157 | Name: "scuttlebot oracle", |
| 158 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 159 | PingDelay: 30 * time.Second, |
| 160 | PingTimeout: 30 * time.Second, |
| 161 | SSL: false, |
| 162 | }) |
| 163 |
| --- internal/bots/oracle/oracle.go | |
| +++ internal/bots/oracle/oracle.go | |
| @@ -148,15 +148,15 @@ | |
| 148 | if err != nil { |
| 149 | return fmt.Errorf("oracle: parse irc addr: %w", err) |
| 150 | } |
| 151 | |
| 152 | c := girc.New(girc.Config{ |
| 153 | Server: host, |
| 154 | Port: port, |
| 155 | Nick: botNick, |
| 156 | User: botNick, |
| 157 | Name: "scuttlebot oracle", |
| 158 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 159 | PingDelay: 30 * time.Second, |
| 160 | PingTimeout: 30 * time.Second, |
| 161 | SSL: false, |
| 162 | }) |
| 163 |
+5
-5
| --- internal/bots/scribe/scribe.go | ||
| +++ internal/bots/scribe/scribe.go | ||
| @@ -52,15 +52,15 @@ | ||
| 52 | 52 | if err != nil { |
| 53 | 53 | return fmt.Errorf("scribe: parse irc addr: %w", err) |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | c := girc.New(girc.Config{ |
| 57 | - Server: host, | |
| 58 | - Port: port, | |
| 59 | - Nick: botNick, | |
| 60 | - User: botNick, | |
| 61 | - Name: "scuttlebot scribe", | |
| 57 | + Server: host, | |
| 58 | + Port: port, | |
| 59 | + Nick: botNick, | |
| 60 | + User: botNick, | |
| 61 | + Name: "scuttlebot scribe", | |
| 62 | 62 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 63 | 63 | PingDelay: 30 * time.Second, |
| 64 | 64 | PingTimeout: 30 * time.Second, |
| 65 | 65 | SSL: false, |
| 66 | 66 | }) |
| 67 | 67 |
| --- internal/bots/scribe/scribe.go | |
| +++ internal/bots/scribe/scribe.go | |
| @@ -52,15 +52,15 @@ | |
| 52 | if err != nil { |
| 53 | return fmt.Errorf("scribe: parse irc addr: %w", err) |
| 54 | } |
| 55 | |
| 56 | c := girc.New(girc.Config{ |
| 57 | Server: host, |
| 58 | Port: port, |
| 59 | Nick: botNick, |
| 60 | User: botNick, |
| 61 | Name: "scuttlebot scribe", |
| 62 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 63 | PingDelay: 30 * time.Second, |
| 64 | PingTimeout: 30 * time.Second, |
| 65 | SSL: false, |
| 66 | }) |
| 67 |
| --- internal/bots/scribe/scribe.go | |
| +++ internal/bots/scribe/scribe.go | |
| @@ -52,15 +52,15 @@ | |
| 52 | if err != nil { |
| 53 | return fmt.Errorf("scribe: parse irc addr: %w", err) |
| 54 | } |
| 55 | |
| 56 | c := girc.New(girc.Config{ |
| 57 | Server: host, |
| 58 | Port: port, |
| 59 | Nick: botNick, |
| 60 | User: botNick, |
| 61 | Name: "scuttlebot scribe", |
| 62 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 63 | PingDelay: 30 * time.Second, |
| 64 | PingTimeout: 30 * time.Second, |
| 65 | SSL: false, |
| 66 | }) |
| 67 |
+5
-5
| --- internal/bots/scroll/scroll.go | ||
| +++ internal/bots/scroll/scroll.go | ||
| @@ -61,15 +61,15 @@ | ||
| 61 | 61 | if err != nil { |
| 62 | 62 | return fmt.Errorf("scroll: parse irc addr: %w", err) |
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | c := girc.New(girc.Config{ |
| 66 | - Server: host, | |
| 67 | - Port: port, | |
| 68 | - Nick: botNick, | |
| 69 | - User: botNick, | |
| 70 | - Name: "scuttlebot scroll", | |
| 66 | + Server: host, | |
| 67 | + Port: port, | |
| 68 | + Nick: botNick, | |
| 69 | + User: botNick, | |
| 70 | + Name: "scuttlebot scroll", | |
| 71 | 71 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 72 | 72 | PingDelay: 30 * time.Second, |
| 73 | 73 | PingTimeout: 30 * time.Second, |
| 74 | 74 | SSL: false, |
| 75 | 75 | }) |
| 76 | 76 |
| --- internal/bots/scroll/scroll.go | |
| +++ internal/bots/scroll/scroll.go | |
| @@ -61,15 +61,15 @@ | |
| 61 | if err != nil { |
| 62 | return fmt.Errorf("scroll: parse irc addr: %w", err) |
| 63 | } |
| 64 | |
| 65 | c := girc.New(girc.Config{ |
| 66 | Server: host, |
| 67 | Port: port, |
| 68 | Nick: botNick, |
| 69 | User: botNick, |
| 70 | Name: "scuttlebot scroll", |
| 71 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 72 | PingDelay: 30 * time.Second, |
| 73 | PingTimeout: 30 * time.Second, |
| 74 | SSL: false, |
| 75 | }) |
| 76 |
| --- internal/bots/scroll/scroll.go | |
| +++ internal/bots/scroll/scroll.go | |
| @@ -61,15 +61,15 @@ | |
| 61 | if err != nil { |
| 62 | return fmt.Errorf("scroll: parse irc addr: %w", err) |
| 63 | } |
| 64 | |
| 65 | c := girc.New(girc.Config{ |
| 66 | Server: host, |
| 67 | Port: port, |
| 68 | Nick: botNick, |
| 69 | User: botNick, |
| 70 | Name: "scuttlebot scroll", |
| 71 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 72 | PingDelay: 30 * time.Second, |
| 73 | PingTimeout: 30 * time.Second, |
| 74 | SSL: false, |
| 75 | }) |
| 76 |
| --- internal/bots/sentinel/sentinel.go | ||
| +++ internal/bots/sentinel/sentinel.go | ||
| @@ -132,15 +132,15 @@ | ||
| 132 | 132 | if err != nil { |
| 133 | 133 | return fmt.Errorf("sentinel: %w", err) |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | 136 | c := girc.New(girc.Config{ |
| 137 | - Server: host, | |
| 138 | - Port: port, | |
| 139 | - Nick: b.cfg.Nick, | |
| 140 | - User: b.cfg.Nick, | |
| 141 | - Name: "scuttlebot sentinel", | |
| 137 | + Server: host, | |
| 138 | + Port: port, | |
| 139 | + Nick: b.cfg.Nick, | |
| 140 | + User: b.cfg.Nick, | |
| 141 | + Name: "scuttlebot sentinel", | |
| 142 | 142 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 143 | 143 | PingDelay: 30 * time.Second, |
| 144 | 144 | PingTimeout: 30 * time.Second, |
| 145 | 145 | }) |
| 146 | 146 | |
| 147 | 147 |
| --- internal/bots/sentinel/sentinel.go | |
| +++ internal/bots/sentinel/sentinel.go | |
| @@ -132,15 +132,15 @@ | |
| 132 | if err != nil { |
| 133 | return fmt.Errorf("sentinel: %w", err) |
| 134 | } |
| 135 | |
| 136 | c := girc.New(girc.Config{ |
| 137 | Server: host, |
| 138 | Port: port, |
| 139 | Nick: b.cfg.Nick, |
| 140 | User: b.cfg.Nick, |
| 141 | Name: "scuttlebot sentinel", |
| 142 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 143 | PingDelay: 30 * time.Second, |
| 144 | PingTimeout: 30 * time.Second, |
| 145 | }) |
| 146 | |
| 147 |
| --- internal/bots/sentinel/sentinel.go | |
| +++ internal/bots/sentinel/sentinel.go | |
| @@ -132,15 +132,15 @@ | |
| 132 | if err != nil { |
| 133 | return fmt.Errorf("sentinel: %w", err) |
| 134 | } |
| 135 | |
| 136 | c := girc.New(girc.Config{ |
| 137 | Server: host, |
| 138 | Port: port, |
| 139 | Nick: b.cfg.Nick, |
| 140 | User: b.cfg.Nick, |
| 141 | Name: "scuttlebot sentinel", |
| 142 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 143 | PingDelay: 30 * time.Second, |
| 144 | PingTimeout: 30 * time.Second, |
| 145 | }) |
| 146 | |
| 147 |
+5
-5
| --- internal/bots/snitch/snitch.go | ||
| +++ internal/bots/snitch/snitch.go | ||
| @@ -121,15 +121,15 @@ | ||
| 121 | 121 | if err != nil { |
| 122 | 122 | return fmt.Errorf("snitch: %w", err) |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | c := girc.New(girc.Config{ |
| 126 | - Server: host, | |
| 127 | - Port: port, | |
| 128 | - Nick: b.cfg.Nick, | |
| 129 | - User: b.cfg.Nick, | |
| 130 | - Name: "scuttlebot snitch", | |
| 126 | + Server: host, | |
| 127 | + Port: port, | |
| 128 | + Nick: b.cfg.Nick, | |
| 129 | + User: b.cfg.Nick, | |
| 130 | + Name: "scuttlebot snitch", | |
| 131 | 131 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 132 | 132 | PingDelay: 30 * time.Second, |
| 133 | 133 | PingTimeout: 30 * time.Second, |
| 134 | 134 | }) |
| 135 | 135 | |
| 136 | 136 |
| --- internal/bots/snitch/snitch.go | |
| +++ internal/bots/snitch/snitch.go | |
| @@ -121,15 +121,15 @@ | |
| 121 | if err != nil { |
| 122 | return fmt.Errorf("snitch: %w", err) |
| 123 | } |
| 124 | |
| 125 | c := girc.New(girc.Config{ |
| 126 | Server: host, |
| 127 | Port: port, |
| 128 | Nick: b.cfg.Nick, |
| 129 | User: b.cfg.Nick, |
| 130 | Name: "scuttlebot snitch", |
| 131 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 132 | PingDelay: 30 * time.Second, |
| 133 | PingTimeout: 30 * time.Second, |
| 134 | }) |
| 135 | |
| 136 |
| --- internal/bots/snitch/snitch.go | |
| +++ internal/bots/snitch/snitch.go | |
| @@ -121,15 +121,15 @@ | |
| 121 | if err != nil { |
| 122 | return fmt.Errorf("snitch: %w", err) |
| 123 | } |
| 124 | |
| 125 | c := girc.New(girc.Config{ |
| 126 | Server: host, |
| 127 | Port: port, |
| 128 | Nick: b.cfg.Nick, |
| 129 | User: b.cfg.Nick, |
| 130 | Name: "scuttlebot snitch", |
| 131 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 132 | PingDelay: 30 * time.Second, |
| 133 | PingTimeout: 30 * time.Second, |
| 134 | }) |
| 135 | |
| 136 |
+5
-5
| --- internal/bots/steward/steward.go | ||
| +++ internal/bots/steward/steward.go | ||
| @@ -116,15 +116,15 @@ | ||
| 116 | 116 | if err != nil { |
| 117 | 117 | return fmt.Errorf("steward: %w", err) |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | c := girc.New(girc.Config{ |
| 121 | - Server: host, | |
| 122 | - Port: port, | |
| 123 | - Nick: b.cfg.Nick, | |
| 124 | - User: b.cfg.Nick, | |
| 125 | - Name: "scuttlebot steward", | |
| 121 | + Server: host, | |
| 122 | + Port: port, | |
| 123 | + Nick: b.cfg.Nick, | |
| 124 | + User: b.cfg.Nick, | |
| 125 | + Name: "scuttlebot steward", | |
| 126 | 126 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 127 | 127 | PingDelay: 30 * time.Second, |
| 128 | 128 | PingTimeout: 30 * time.Second, |
| 129 | 129 | }) |
| 130 | 130 | |
| 131 | 131 |
| --- internal/bots/steward/steward.go | |
| +++ internal/bots/steward/steward.go | |
| @@ -116,15 +116,15 @@ | |
| 116 | if err != nil { |
| 117 | return fmt.Errorf("steward: %w", err) |
| 118 | } |
| 119 | |
| 120 | c := girc.New(girc.Config{ |
| 121 | Server: host, |
| 122 | Port: port, |
| 123 | Nick: b.cfg.Nick, |
| 124 | User: b.cfg.Nick, |
| 125 | Name: "scuttlebot steward", |
| 126 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 127 | PingDelay: 30 * time.Second, |
| 128 | PingTimeout: 30 * time.Second, |
| 129 | }) |
| 130 | |
| 131 |
| --- internal/bots/steward/steward.go | |
| +++ internal/bots/steward/steward.go | |
| @@ -116,15 +116,15 @@ | |
| 116 | if err != nil { |
| 117 | return fmt.Errorf("steward: %w", err) |
| 118 | } |
| 119 | |
| 120 | c := girc.New(girc.Config{ |
| 121 | Server: host, |
| 122 | Port: port, |
| 123 | Nick: b.cfg.Nick, |
| 124 | User: b.cfg.Nick, |
| 125 | Name: "scuttlebot steward", |
| 126 | SASL: &girc.SASLPlain{User: b.cfg.Nick, Pass: b.cfg.Password}, |
| 127 | PingDelay: 30 * time.Second, |
| 128 | PingTimeout: 30 * time.Second, |
| 129 | }) |
| 130 | |
| 131 |
| --- internal/bots/systembot/systembot.go | ||
| +++ internal/bots/systembot/systembot.go | ||
| @@ -79,15 +79,15 @@ | ||
| 79 | 79 | if err != nil { |
| 80 | 80 | return fmt.Errorf("systembot: parse irc addr: %w", err) |
| 81 | 81 | } |
| 82 | 82 | |
| 83 | 83 | c := girc.New(girc.Config{ |
| 84 | - Server: host, | |
| 85 | - Port: port, | |
| 86 | - Nick: botNick, | |
| 87 | - User: botNick, | |
| 88 | - Name: "scuttlebot systembot", | |
| 84 | + Server: host, | |
| 85 | + Port: port, | |
| 86 | + Nick: botNick, | |
| 87 | + User: botNick, | |
| 88 | + Name: "scuttlebot systembot", | |
| 89 | 89 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 90 | 90 | PingDelay: 30 * time.Second, |
| 91 | 91 | PingTimeout: 30 * time.Second, |
| 92 | 92 | SSL: false, |
| 93 | 93 | }) |
| 94 | 94 |
| --- internal/bots/systembot/systembot.go | |
| +++ internal/bots/systembot/systembot.go | |
| @@ -79,15 +79,15 @@ | |
| 79 | if err != nil { |
| 80 | return fmt.Errorf("systembot: parse irc addr: %w", err) |
| 81 | } |
| 82 | |
| 83 | c := girc.New(girc.Config{ |
| 84 | Server: host, |
| 85 | Port: port, |
| 86 | Nick: botNick, |
| 87 | User: botNick, |
| 88 | Name: "scuttlebot systembot", |
| 89 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 90 | PingDelay: 30 * time.Second, |
| 91 | PingTimeout: 30 * time.Second, |
| 92 | SSL: false, |
| 93 | }) |
| 94 |
| --- internal/bots/systembot/systembot.go | |
| +++ internal/bots/systembot/systembot.go | |
| @@ -79,15 +79,15 @@ | |
| 79 | if err != nil { |
| 80 | return fmt.Errorf("systembot: parse irc addr: %w", err) |
| 81 | } |
| 82 | |
| 83 | c := girc.New(girc.Config{ |
| 84 | Server: host, |
| 85 | Port: port, |
| 86 | Nick: botNick, |
| 87 | User: botNick, |
| 88 | Name: "scuttlebot systembot", |
| 89 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 90 | PingDelay: 30 * time.Second, |
| 91 | PingTimeout: 30 * time.Second, |
| 92 | SSL: false, |
| 93 | }) |
| 94 |
+5
-5
| --- internal/bots/warden/warden.go | ||
| +++ internal/bots/warden/warden.go | ||
| @@ -185,15 +185,15 @@ | ||
| 185 | 185 | if err != nil { |
| 186 | 186 | return fmt.Errorf("warden: parse irc addr: %w", err) |
| 187 | 187 | } |
| 188 | 188 | |
| 189 | 189 | c := girc.New(girc.Config{ |
| 190 | - Server: host, | |
| 191 | - Port: port, | |
| 192 | - Nick: botNick, | |
| 193 | - User: botNick, | |
| 194 | - Name: "scuttlebot warden", | |
| 190 | + Server: host, | |
| 191 | + Port: port, | |
| 192 | + Nick: botNick, | |
| 193 | + User: botNick, | |
| 194 | + Name: "scuttlebot warden", | |
| 195 | 195 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 196 | 196 | PingDelay: 30 * time.Second, |
| 197 | 197 | PingTimeout: 30 * time.Second, |
| 198 | 198 | SSL: false, |
| 199 | 199 | }) |
| 200 | 200 |
| --- internal/bots/warden/warden.go | |
| +++ internal/bots/warden/warden.go | |
| @@ -185,15 +185,15 @@ | |
| 185 | if err != nil { |
| 186 | return fmt.Errorf("warden: parse irc addr: %w", err) |
| 187 | } |
| 188 | |
| 189 | c := girc.New(girc.Config{ |
| 190 | Server: host, |
| 191 | Port: port, |
| 192 | Nick: botNick, |
| 193 | User: botNick, |
| 194 | Name: "scuttlebot warden", |
| 195 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 196 | PingDelay: 30 * time.Second, |
| 197 | PingTimeout: 30 * time.Second, |
| 198 | SSL: false, |
| 199 | }) |
| 200 |
| --- internal/bots/warden/warden.go | |
| +++ internal/bots/warden/warden.go | |
| @@ -185,15 +185,15 @@ | |
| 185 | if err != nil { |
| 186 | return fmt.Errorf("warden: parse irc addr: %w", err) |
| 187 | } |
| 188 | |
| 189 | c := girc.New(girc.Config{ |
| 190 | Server: host, |
| 191 | Port: port, |
| 192 | Nick: botNick, |
| 193 | User: botNick, |
| 194 | Name: "scuttlebot warden", |
| 195 | SASL: &girc.SASLPlain{User: botNick, Pass: b.password}, |
| 196 | PingDelay: 30 * time.Second, |
| 197 | PingTimeout: 30 * time.Second, |
| 198 | SSL: false, |
| 199 | }) |
| 200 |
+7
-7
| --- internal/registry/registry.go | ||
| +++ internal/registry/registry.go | ||
| @@ -72,17 +72,17 @@ | ||
| 72 | 72 | ChangePassword(name, passphrase string) error |
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | // Registry manages registered agents and their credentials. |
| 76 | 76 | type Registry struct { |
| 77 | - mu sync.RWMutex | |
| 78 | - agents map[string]*Agent // keyed by nick | |
| 79 | - provisioner AccountProvisioner | |
| 80 | - signingKey []byte | |
| 81 | - dataPath string // path to persist agents JSON; empty = no persistence | |
| 82 | - db *store.Store // when non-nil, supersedes dataPath | |
| 83 | - onlineTimeout time.Duration | |
| 77 | + mu sync.RWMutex | |
| 78 | + agents map[string]*Agent // keyed by nick | |
| 79 | + provisioner AccountProvisioner | |
| 80 | + signingKey []byte | |
| 81 | + dataPath string // path to persist agents JSON; empty = no persistence | |
| 82 | + db *store.Store // when non-nil, supersedes dataPath | |
| 83 | + onlineTimeout time.Duration | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | // New creates a new Registry with the given provisioner and HMAC signing key. |
| 87 | 87 | // Call SetDataPath to enable persistence before registering any agents. |
| 88 | 88 | func New(provisioner AccountProvisioner, signingKey []byte) *Registry { |
| 89 | 89 |
| --- internal/registry/registry.go | |
| +++ internal/registry/registry.go | |
| @@ -72,17 +72,17 @@ | |
| 72 | ChangePassword(name, passphrase string) error |
| 73 | } |
| 74 | |
| 75 | // Registry manages registered agents and their credentials. |
| 76 | type Registry struct { |
| 77 | mu sync.RWMutex |
| 78 | agents map[string]*Agent // keyed by nick |
| 79 | provisioner AccountProvisioner |
| 80 | signingKey []byte |
| 81 | dataPath string // path to persist agents JSON; empty = no persistence |
| 82 | db *store.Store // when non-nil, supersedes dataPath |
| 83 | onlineTimeout time.Duration |
| 84 | } |
| 85 | |
| 86 | // New creates a new Registry with the given provisioner and HMAC signing key. |
| 87 | // Call SetDataPath to enable persistence before registering any agents. |
| 88 | func New(provisioner AccountProvisioner, signingKey []byte) *Registry { |
| 89 |
| --- internal/registry/registry.go | |
| +++ internal/registry/registry.go | |
| @@ -72,17 +72,17 @@ | |
| 72 | ChangePassword(name, passphrase string) error |
| 73 | } |
| 74 | |
| 75 | // Registry manages registered agents and their credentials. |
| 76 | type Registry struct { |
| 77 | mu sync.RWMutex |
| 78 | agents map[string]*Agent // keyed by nick |
| 79 | provisioner AccountProvisioner |
| 80 | signingKey []byte |
| 81 | dataPath string // path to persist agents JSON; empty = no persistence |
| 82 | db *store.Store // when non-nil, supersedes dataPath |
| 83 | onlineTimeout time.Duration |
| 84 | } |
| 85 | |
| 86 | // New creates a new Registry with the given provisioner and HMAC signing key. |
| 87 | // Call SetDataPath to enable persistence before registering any agents. |
| 88 | func New(provisioner AccountProvisioner, signingKey []byte) *Registry { |
| 89 |
| --- internal/store/store.go | ||
| +++ internal/store/store.go | ||
| @@ -100,10 +100,11 @@ | ||
| 100 | 100 | for _, stmt := range addColumns { |
| 101 | 101 | _, _ = s.db.Exec(stmt) // ignore "column already exists" |
| 102 | 102 | } |
| 103 | 103 | return nil |
| 104 | 104 | } |
| 105 | + | |
| 105 | 106 | // AgentUpsert inserts or updates an agent row by nick. |
| 106 | 107 | func (s *Store) AgentUpsert(r *AgentRow) error { |
| 107 | 108 | revoked := 0 |
| 108 | 109 | if r.Revoked { |
| 109 | 110 | revoked = 1 |
| 110 | 111 |
| --- internal/store/store.go | |
| +++ internal/store/store.go | |
| @@ -100,10 +100,11 @@ | |
| 100 | for _, stmt := range addColumns { |
| 101 | _, _ = s.db.Exec(stmt) // ignore "column already exists" |
| 102 | } |
| 103 | return nil |
| 104 | } |
| 105 | // AgentUpsert inserts or updates an agent row by nick. |
| 106 | func (s *Store) AgentUpsert(r *AgentRow) error { |
| 107 | revoked := 0 |
| 108 | if r.Revoked { |
| 109 | revoked = 1 |
| 110 |
| --- internal/store/store.go | |
| +++ internal/store/store.go | |
| @@ -100,10 +100,11 @@ | |
| 100 | for _, stmt := range addColumns { |
| 101 | _, _ = s.db.Exec(stmt) // ignore "column already exists" |
| 102 | } |
| 103 | return nil |
| 104 | } |
| 105 | |
| 106 | // AgentUpsert inserts or updates an agent row by nick. |
| 107 | func (s *Store) AgentUpsert(r *AgentRow) error { |
| 108 | revoked := 0 |
| 109 | if r.Revoked { |
| 110 | revoked = 1 |
| 111 |
+1
-1
| --- pkg/sessionrelay/irc.go | ||
| +++ pkg/sessionrelay/irc.go | ||
| @@ -203,11 +203,11 @@ | ||
| 203 | 203 | default: |
| 204 | 204 | } |
| 205 | 205 | }() |
| 206 | 206 | continue |
| 207 | 207 | } |
| 208 | - fmt.Fprintf(os.Stderr, "sessionrelay: credentials refreshed, dialing...\n", ) | |
| 208 | + fmt.Fprintf(os.Stderr, "sessionrelay: credentials refreshed, dialing...\n") | |
| 209 | 209 | |
| 210 | 210 | wait = min(wait*2, ircReconnectMax) |
| 211 | 211 | c.dial(host, port, func() { |
| 212 | 212 | wait = ircReconnectMin |
| 213 | 213 | fmt.Fprintf(os.Stderr, "sessionrelay: reconnected successfully\n") |
| 214 | 214 |
| --- pkg/sessionrelay/irc.go | |
| +++ pkg/sessionrelay/irc.go | |
| @@ -203,11 +203,11 @@ | |
| 203 | default: |
| 204 | } |
| 205 | }() |
| 206 | continue |
| 207 | } |
| 208 | fmt.Fprintf(os.Stderr, "sessionrelay: credentials refreshed, dialing...\n", ) |
| 209 | |
| 210 | wait = min(wait*2, ircReconnectMax) |
| 211 | c.dial(host, port, func() { |
| 212 | wait = ircReconnectMin |
| 213 | fmt.Fprintf(os.Stderr, "sessionrelay: reconnected successfully\n") |
| 214 |
| --- pkg/sessionrelay/irc.go | |
| +++ pkg/sessionrelay/irc.go | |
| @@ -203,11 +203,11 @@ | |
| 203 | default: |
| 204 | } |
| 205 | }() |
| 206 | continue |
| 207 | } |
| 208 | fmt.Fprintf(os.Stderr, "sessionrelay: credentials refreshed, dialing...\n") |
| 209 | |
| 210 | wait = min(wait*2, ircReconnectMax) |
| 211 | c.dial(host, port, func() { |
| 212 | wait = ircReconnectMin |
| 213 | fmt.Fprintf(os.Stderr, "sessionrelay: reconnected successfully\n") |
| 214 |