diff --git a/irc/handler/handler.go b/irc/handler/handler.go index 8528a09..1bcab4c 100644 --- a/irc/handler/handler.go +++ b/irc/handler/handler.go @@ -23,12 +23,16 @@ import ( "log" "strings" + "github.com/charmbracelet/lipgloss" "github.com/illusionman1212/gorc/cmds" "github.com/illusionman1212/gorc/irc" "github.com/illusionman1212/gorc/irc/commands" "github.com/illusionman1212/gorc/irc/parser" + "github.com/illusionman1212/gorc/ui" ) +var notImpl = lipgloss.NewStyle().Foreground(ui.Red).Render("[NOT IMPL]") + func ReadLoop(client *irc.Client) { // 512 bytes as a base + 8192 additional bytes for tags r := bufio.NewReaderSize(client.TcpConn, 8192+512) @@ -310,7 +314,14 @@ func HandleCommand(msg parser.IRCMessage, client *irc.Client) { // start a timeout and update said timeout on every RPL_MOTD // and log an error if timeout ends without receiving this command. default: - fullMsg := fmt.Sprintf("%s %s %s %s", msg.Tags, msg.Source, msg.Command, strings.Join(msg.Parameters, " ")) + fullMsg := fmt.Sprintf( + "%s %s %s %s %s", + notImpl, + msg.Tags, + msg.Source, + msg.Command, + strings.Join(msg.Parameters, " "), + ) client.Channels[0].History += fullMsg + irc.CRLF } diff --git a/ui/styles.go b/ui/styles.go index 14973bf..8588fc6 100644 --- a/ui/styles.go +++ b/ui/styles.go @@ -42,4 +42,6 @@ var ( Dark: "#666", Light: "#CCC", } + + Red = lipgloss.Color("#F00") )