mirror of
https://github.com/IllusionMan1212/gorc.git
synced 2026-10-24 02:12:33 +00:00
27 lines
381 B
Go
27 lines
381 B
Go
package mainscreen
|
|
|
|
import (
|
|
"log"
|
|
|
|
tea "github.com/charmbracelet/bubbletea"
|
|
)
|
|
|
|
type ReceivedIRCCommandMsg struct {
|
|
Msg string
|
|
}
|
|
|
|
type InitialReadMsg struct{}
|
|
|
|
func InitialRead() tea.Msg {
|
|
return InitialReadMsg{}
|
|
}
|
|
|
|
func (s State) readFromServer() tea.Msg {
|
|
msg, err := s.Reader.ReadString('\n')
|
|
if err != nil {
|
|
log.Print(err)
|
|
}
|
|
|
|
return ReceivedIRCCommandMsg{Msg: msg}
|
|
}
|