ScuttleBot

perf: AllowFlood on bridge IRC connection — instant message delivery girc's built-in flood protection was adding ~1.4s delay per message. The bridge connects to our own local Ergo instance over loopback — flood protection is unnecessary and was causing visible lag in the web UI chat and relay message delivery.

lmata 2026-04-05 23:09 trunk
Commit 8a95200b21bc8b3a2c78324188ae2f9370d4164495854ede63c73155508b7d2e
--- cmd/scuttlebot/main.go
+++ cmd/scuttlebot/main.go
@@ -247,11 +247,22 @@
247247
}
248248
}
249249
if bridgeBot != nil {
250250
bridgeBot.SetWebUserTTL(time.Duration(policyStore.Get().Bridge.WebUserTTLMinutes) * time.Minute)
251251
// Deliver on-join instructions when agents join channels.
252
+ // Skip system bots to avoid flooding the bridge IRC connection on startup.
252253
bridgeBot.SetOnUserJoin(func(channel, nick string) {
254
+ // Don't send on-join to system bots — they already know what to do.
255
+ systemBots := map[string]bool{
256
+ "bridge": true, "auditbot": true, "scribe": true, "herald": true,
257
+ "oracle": true, "warden": true, "scroll": true, "systembot": true,
258
+ "snitch": true, "sentinel": true, "steward": true, "shepherd": true,
259
+ "topology": true,
260
+ }
261
+ if systemBots[nick] {
262
+ return
263
+ }
253264
p := policyStore.Get()
254265
msg, ok := p.OnJoinMessages[channel]
255266
if !ok || msg == "" {
256267
return
257268
}
258269
--- cmd/scuttlebot/main.go
+++ cmd/scuttlebot/main.go
@@ -247,11 +247,22 @@
247 }
248 }
249 if bridgeBot != nil {
250 bridgeBot.SetWebUserTTL(time.Duration(policyStore.Get().Bridge.WebUserTTLMinutes) * time.Minute)
251 // Deliver on-join instructions when agents join channels.
 
252 bridgeBot.SetOnUserJoin(func(channel, nick string) {
 
 
 
 
 
 
 
 
 
 
253 p := policyStore.Get()
254 msg, ok := p.OnJoinMessages[channel]
255 if !ok || msg == "" {
256 return
257 }
258
--- cmd/scuttlebot/main.go
+++ cmd/scuttlebot/main.go
@@ -247,11 +247,22 @@
247 }
248 }
249 if bridgeBot != nil {
250 bridgeBot.SetWebUserTTL(time.Duration(policyStore.Get().Bridge.WebUserTTLMinutes) * time.Minute)
251 // Deliver on-join instructions when agents join channels.
252 // Skip system bots to avoid flooding the bridge IRC connection on startup.
253 bridgeBot.SetOnUserJoin(func(channel, nick string) {
254 // Don't send on-join to system bots — they already know what to do.
255 systemBots := map[string]bool{
256 "bridge": true, "auditbot": true, "scribe": true, "herald": true,
257 "oracle": true, "warden": true, "scroll": true, "systembot": true,
258 "snitch": true, "sentinel": true, "steward": true, "shepherd": true,
259 "topology": true,
260 }
261 if systemBots[nick] {
262 return
263 }
264 p := policyStore.Get()
265 msg, ok := p.OnJoinMessages[channel]
266 if !ok || msg == "" {
267 return
268 }
269
--- internal/bots/bridge/bridge.go
+++ internal/bots/bridge/bridge.go
@@ -186,10 +186,11 @@
186186
Name: "scuttlebot bridge",
187187
SASL: &girc.SASLPlain{User: b.nick, Pass: b.password},
188188
PingDelay: 30 * time.Second,
189189
PingTimeout: 30 * time.Second,
190190
SSL: false,
191
+ AllowFlood: true, // trusted local connection — no rate limiting
191192
})
192193
193194
c.Handlers.AddBg(girc.CONNECTED, func(cl *girc.Client, _ girc.Event) {
194195
cl.Cmd.Mode(cl.GetNick(), "+B")
195196
// Check RELAYMSG support from ISUPPORT (RPL_005).
196197
--- internal/bots/bridge/bridge.go
+++ internal/bots/bridge/bridge.go
@@ -186,10 +186,11 @@
186 Name: "scuttlebot bridge",
187 SASL: &girc.SASLPlain{User: b.nick, Pass: b.password},
188 PingDelay: 30 * time.Second,
189 PingTimeout: 30 * time.Second,
190 SSL: false,
 
191 })
192
193 c.Handlers.AddBg(girc.CONNECTED, func(cl *girc.Client, _ girc.Event) {
194 cl.Cmd.Mode(cl.GetNick(), "+B")
195 // Check RELAYMSG support from ISUPPORT (RPL_005).
196
--- internal/bots/bridge/bridge.go
+++ internal/bots/bridge/bridge.go
@@ -186,10 +186,11 @@
186 Name: "scuttlebot bridge",
187 SASL: &girc.SASLPlain{User: b.nick, Pass: b.password},
188 PingDelay: 30 * time.Second,
189 PingTimeout: 30 * time.Second,
190 SSL: false,
191 AllowFlood: true, // trusted local connection — no rate limiting
192 })
193
194 c.Handlers.AddBg(girc.CONNECTED, func(cl *girc.Client, _ girc.Event) {
195 cl.Cmd.Mode(cl.GetNick(), "+B")
196 // Check RELAYMSG support from ISUPPORT (RPL_005).
197

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button