Added nick change handling, the client now shows nick and quit messages, the userlist gets hidden when the chat window is not a channel
This commit is contained in:
parent
c421dc504b
commit
5f43b3e78e
9 changed files with 85 additions and 3 deletions
|
@ -15,6 +15,17 @@ func handleMessages(irc *IRC, session *Session) {
|
|||
|
||||
for msg := range irc.Messages {
|
||||
switch msg.Command {
|
||||
case NICK:
|
||||
printMessage(msg, irc)
|
||||
|
||||
session.sendJSON("nick", Nick{
|
||||
Server: irc.Host,
|
||||
Old: msg.Prefix,
|
||||
New: msg.Trailing,
|
||||
})
|
||||
|
||||
channelStore.RenameUser(msg.Prefix, msg.Trailing, irc.Host)
|
||||
|
||||
case JOIN:
|
||||
user := msg.Prefix
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue