summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2021-07-13 19:30:30 +0200
committerHubert Hirtz <hubert@hirtz.pm>2021-07-13 23:12:56 +0200
commitfbe14ad58816ed90e22c1dd998cea2844f0fed38 (patch)
tree83853289e2a8ca156a2e490ba7b5380d0d3b94b6 /app.go
parentDon't send typing=done when input is already empty (diff)
Automatically join channels on start
Supporting channels with keys and merging JOINs in a single message is TODO for later. :)
Diffstat (limited to '')
-rw-r--r--app.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/app.go b/app.go
index 820a356..4bd12db 100644
--- a/app.go
+++ b/app.go
@@ -457,6 +457,11 @@ func (app *App) handleIRCEvent(ev interface{}) {
// Mutate UI state
switch ev := ev.(type) {
case irc.RegisteredEvent:
+ for _, channel := range app.cfg.Channels {
+ // TODO: group JOIN messages
+ // TODO: support autojoining channels with keys
+ app.s.Join(channel, "")
+ }
body := new(ui.StyledStringBuilder)
body.WriteString("Connected to the server")
if app.s.Nick() != app.cfg.Nick {