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:
khlieng 2015-01-31 23:35:38 +01:00
parent c421dc504b
commit 5f43b3e78e
9 changed files with 85 additions and 3 deletions

View file

@ -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