forked from External/ergo
add client compatibility switches
This commit is contained in:
parent
939729a7c0
commit
fbc6c84a01
6 changed files with 54 additions and 17 deletions
|
|
@ -1085,7 +1085,8 @@ var (
|
|||
func (session *Session) SendRawMessage(message ircmsg.IrcMessage, blocking bool) error {
|
||||
// use dumb hack to force the last param to be a trailing param if required
|
||||
var usedTrailingHack bool
|
||||
if commandsThatMustUseTrailing[message.Command] && len(message.Params) > 0 {
|
||||
config := session.client.server.Config()
|
||||
if config.Server.Compatibility.forceTrailing && commandsThatMustUseTrailing[message.Command] && len(message.Params) > 0 {
|
||||
lastParam := message.Params[len(message.Params)-1]
|
||||
// to force trailing, we ensure the final param contains a space
|
||||
if strings.IndexByte(lastParam, ' ') == -1 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue