MCPcopy Create free account
hub / github.com/babycommando/nightride-cli / applyChanLine

Method applyChanLine

zuse.go:337–358  ·  view source on GitHub ↗
(msg ircChanLineMsg)

Source from the content-addressed store, hash-verified

335}
336
337func (m *ircModel) applyChanLine(msg ircChanLineMsg) {
338 if !m.ready {
339 if s := m.servers[msg.id]; s != nil {
340 s.queued = append(s.queued, msg)
341 }
342 return
343 }
344 if s, ok := m.servers[msg.id]; ok {
345 if s.channelLogs == nil {
346 s.channelLogs = make(map[string][]string)
347 }
348 ch := msg.channel
349 if ch == "" {
350 ch = "_sys"
351 }
352 s.channelLogs[ch] = append(s.channelLogs[ch], msg.line)
353
354 if m.mode == modeChat && m.activeID == msg.id && m.activeChan == ch {
355 m.refreshChat()
356 }
357 }
358}
359
360func (m *ircModel) pushSysLine(id serverID, ch, txt string) {
361 if s := m.servers[id]; s != nil {

Callers 1

UpdateMethod · 0.95

Calls 1

refreshChatMethod · 0.95

Tested by

no test coverage detected