handle offline status correctly and other changes
This commit is contained in:
parent
dcc018efec
commit
6c66b32396
7 changed files with 93 additions and 81 deletions
|
|
@ -87,13 +87,14 @@ func (app *App) submitTextInput() {
|
|||
name, rest, _ := strings.Cut(app.input.String()[1:], " ")
|
||||
if cmd, ok := CommandMap[name]; ok {
|
||||
cmd(app, rest)
|
||||
} else if alias, ok := AliasMap[name]; ok {
|
||||
cmd := CommandMap[alias]
|
||||
cmd(app, rest)
|
||||
} else {
|
||||
app.AppendSystemMessage("unknown command \"%s\"", name)
|
||||
}
|
||||
} else {
|
||||
message := fmt.Sprintf("%s: %s", app.nick, app.input.String())
|
||||
app.AppendMessage(message)
|
||||
app.outgoing <- MessageEvent(message)
|
||||
app.outgoing <- MessageEvent(fmt.Sprintf("%s: %s", app.nick, app.input.String()))
|
||||
app.outgoing <- StatEvent("")
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue