summaryrefslogtreecommitdiff
path: root/app.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app.go10
1 files changed, 9 insertions, 1 deletions
diff --git a/app.go b/app.go
index b7bd45c..2447175 100644
--- a/app.go
+++ b/app.go
@@ -527,7 +527,15 @@ func (app *App) handleIRCEvent(ev interface{}) {
msg := ev.(irc.Message)
// Mutate IRC state
- ev = app.s.HandleMessage(msg)
+ ev, err := app.s.HandleMessage(msg)
+ if err != nil {
+ app.win.AddLine(Home, ui.NotifyUnread, ui.Line{
+ Head: "!!",
+ HeadColor: tcell.ColorRed,
+ Body: ui.PlainSprintf("Received corrupt message %q: %s", msg.String(), err),
+ })
+ return
+ }
// Mutate UI state
switch ev := ev.(type) {