mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-23 03:02:48 +01:00
Merge pull request #1383 from slingamn/chanserv
fix output bugs in AMODE handling
This commit is contained in:
commit
4fc396c3ef
@ -820,6 +820,11 @@ func (channel *Channel) Join(client *Client, key string, isSajoin bool, rb *Resp
|
|||||||
// don't send topic and names for a SAJOIN of a different client
|
// don't send topic and names for a SAJOIN of a different client
|
||||||
channel.SendTopic(client, rb, false)
|
channel.SendTopic(client, rb, false)
|
||||||
channel.Names(client, rb)
|
channel.Names(client, rb)
|
||||||
|
} else {
|
||||||
|
// ensure that SAJOIN sends a MODE line to the originating client, if applicable
|
||||||
|
if givenMode != 0 {
|
||||||
|
rb.Add(nil, client.server.name, "MODE", chname, modestr, details.nick)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO #259 can be implemented as Flush(false) (i.e., nonblocking) while holding joinPartMutex
|
// TODO #259 can be implemented as Flush(false) (i.e., nonblocking) while holding joinPartMutex
|
||||||
|
@ -265,7 +265,7 @@ func csAmodeHandler(server *Server, client *Client, command string, params []str
|
|||||||
if member.Account() == change.Arg {
|
if member.Account() == change.Arg {
|
||||||
applied, change := channel.applyModeToMember(client, change, rb)
|
applied, change := channel.applyModeToMember(client, change, rb)
|
||||||
if applied {
|
if applied {
|
||||||
announceCmodeChanges(channel, modes.ModeChanges{change}, chanservMask, "*", "", rb)
|
announceCmodeChanges(channel, modes.ModeChanges{change}, server.name, "*", "", rb)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -312,7 +312,7 @@ func csOpHandler(server *Server, client *Client, command string, params []string
|
|||||||
},
|
},
|
||||||
rb)
|
rb)
|
||||||
if applied {
|
if applied {
|
||||||
announceCmodeChanges(channelInfo, modes.ModeChanges{change}, chanservMask, "*", "", rb)
|
announceCmodeChanges(channelInfo, modes.ModeChanges{change}, server.name, "*", "", rb)
|
||||||
}
|
}
|
||||||
|
|
||||||
csNotice(rb, client.t("Successfully granted operator privileges"))
|
csNotice(rb, client.t("Successfully granted operator privileges"))
|
||||||
|
Loading…
Reference in New Issue
Block a user