commit e52876a

sewn  ·  2025-07-15 19:35:09 +0000 UTC
parent c7858c8
allow empty messages to be sent and recieved

PRIVMSG can have no content, but it is different than having spaces.
Sending nothing isn't permitted, however, sending a single space is,
and is interpeted as usual on other IRC clients.

Signed-off-by: sewn <sewn@disroot.org>
1 files changed,  +0, -6
M app.go
M app.go
+0, -6
 1@@ -1481,9 +1481,6 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
 2 		})
 3 	case irc.MessageEvent:
 4 		buffer, line := app.formatMessage(s, ev)
 5-		if line.IsZero() {
 6-			break
 7-		}
 8 		if buffer != "" && !s.IsChannel(buffer) {
 9 			t, ok := msg.Time()
10 			if !ok {
11@@ -1544,9 +1541,6 @@ func (app *App) handleIRCEvent(netID string, ev interface{}) {
12 			default:
13 				line = app.formatEvent(ev)
14 			}
15-			if line.IsZero() {
16-				continue
17-			}
18 			boundsNew.Update(&line)
19 			if _, ok := m.(irc.MessageEvent); !ok && !app.cfg.StatusEnabled {
20 				continue