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
|
@ -75,6 +75,12 @@ func (c *ChannelStore) RemoveUserAll(user, server string) {
|
|||
c.userLock.Unlock()
|
||||
}
|
||||
|
||||
func (c *ChannelStore) RenameUser(oldNick, newNick, server string) {
|
||||
c.userLock.Lock()
|
||||
c.renameAll(server, oldNick, newNick)
|
||||
c.userLock.Unlock()
|
||||
}
|
||||
|
||||
func (c *ChannelStore) SetMode(server, channel, user, add, remove string) {
|
||||
c.userLock.Lock()
|
||||
|
||||
|
@ -118,6 +124,12 @@ func (c *ChannelStore) rename(server, channel, oldNick, newNick string) {
|
|||
}
|
||||
}
|
||||
|
||||
func (c *ChannelStore) renameAll(server, oldNick, newNick string) {
|
||||
for channel, _ := range c.users[server] {
|
||||
c.rename(server, channel, oldNick, newNick)
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ChannelStore) removeUser(user, server, channel string) {
|
||||
for i, u := range c.users[server][channel] {
|
||||
u = strings.TrimLeft(u, "@+")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue