mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix #392
This commit is contained in:
parent
3d89c70c49
commit
344a1d7e48
@ -855,7 +855,7 @@ func (channel *Channel) applyModeToMember(client *Client, mode modes.Mode, op mo
|
|||||||
casefoldedName, err := CasefoldName(nick)
|
casefoldedName, err := CasefoldName(nick)
|
||||||
target := channel.server.clients.Get(casefoldedName)
|
target := channel.server.clients.Get(casefoldedName)
|
||||||
if err != nil || target == nil {
|
if err != nil || target == nil {
|
||||||
rb.Add(nil, client.server.name, ERR_NOSUCHNICK, client.nick, nick, client.t("No such nick"))
|
rb.Add(nil, client.server.name, ERR_NOSUCHNICK, client.Nick(), nick, client.t("No such nick"))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -873,7 +873,7 @@ func (channel *Channel) applyModeToMember(client *Client, mode modes.Mode, op mo
|
|||||||
channel.stateMutex.Unlock()
|
channel.stateMutex.Unlock()
|
||||||
|
|
||||||
if !exists {
|
if !exists {
|
||||||
rb.Add(nil, client.server.name, ERR_USERNOTINCHANNEL, client.nick, channel.name, client.t("They aren't on that channel"))
|
rb.Add(nil, client.server.name, ERR_USERNOTINCHANNEL, client.Nick(), channel.Name(), client.t("They aren't on that channel"))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -189,10 +189,10 @@ func csOpHandler(server *Server, client *Client, command string, params []string
|
|||||||
|
|
||||||
// give them privs
|
// give them privs
|
||||||
givenMode := modes.ChannelOperator
|
givenMode := modes.ChannelOperator
|
||||||
if client == target {
|
if clientAccount == target.Account() {
|
||||||
givenMode = modes.ChannelFounder
|
givenMode = modes.ChannelFounder
|
||||||
}
|
}
|
||||||
change := channelInfo.applyModeToMember(target, givenMode, modes.Add, client.NickCasefolded(), rb)
|
change := channelInfo.applyModeToMember(client, givenMode, modes.Add, target.NickCasefolded(), rb)
|
||||||
if change != nil {
|
if change != nil {
|
||||||
//TODO(dan): we should change the name of String and make it return a slice here
|
//TODO(dan): we should change the name of String and make it return a slice here
|
||||||
//TODO(dan): unify this code with code in modes.go
|
//TODO(dan): unify this code with code in modes.go
|
||||||
|
Loading…
Reference in New Issue
Block a user