Changeset 754 in code


Ignore:
Timestamp:
Dec 7, 2021, 8:42:32 AM (4 years ago)
Author:
contact
Message:

Use dc.nick instead of "*" for RPL_* messages

Makes it clearer what these fields are used for. The default value
for dc.nick is "*".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/downstream.go

    r753 r754  
    928928                        Prefix:  dc.srv.prefix(),
    929929                        Command: irc.ERR_SASLFAIL,
    930                         Params:  []string{"*", "AUTHENTICATE requires the \"sasl\" capability to be enabled"},
     930                        Params:  []string{dc.nick, "AUTHENTICATE requires the \"sasl\" capability to be enabled"},
    931931                }}
    932932        }
     
    935935                        Prefix:  dc.srv.prefix(),
    936936                        Command: irc.ERR_SASLFAIL,
    937                         Params:  []string{"*", "Missing AUTHENTICATE argument"},
     937                        Params:  []string{dc.nick, "Missing AUTHENTICATE argument"},
    938938                }}
    939939        }
     
    942942                        Prefix:  dc.srv.prefix(),
    943943                        Command: irc.ERR_SASLABORTED,
    944                         Params:  []string{"*", "SASL authentication aborted"},
     944                        Params:  []string{dc.nick, "SASL authentication aborted"},
    945945                }}
    946946        }
     
    961961                                Prefix:  dc.srv.prefix(),
    962962                                Command: irc.ERR_SASLFAIL,
    963                                 Params:  []string{"*", fmt.Sprintf("Unsupported SASL mechanism %q", mech)},
     963                                Params:  []string{dc.nick, fmt.Sprintf("Unsupported SASL mechanism %q", mech)},
    964964                        }}
    965965                }
     
    974974                                Prefix:  dc.srv.prefix(),
    975975                                Command: irc.ERR_SASLFAIL,
    976                                 Params:  []string{"*", "Invalid base64-encoded response"},
     976                                Params:  []string{dc.nick, "Invalid base64-encoded response"},
    977977                        }}
    978978                }
     
    12301230                        Prefix:  dc.srv.prefix(),
    12311231                        Command: irc.ERR_SASLABORTED,
    1232                         Params:  []string{"*", "SASL authentication aborted"},
     1232                        Params:  []string{dc.nick, "SASL authentication aborted"},
    12331233                })
    12341234        }
     
    12861286                        return ircError{&irc.Message{
    12871287                                Command: irc.ERR_PASSWDMISMATCH,
    1288                                 Params:  []string{"*", fmt.Sprintf("Failed to connect to %q", dc.networkName)},
     1288                                Params:  []string{dc.nick, fmt.Sprintf("Failed to connect to %q", dc.networkName)},
    12891289                        }}
    12901290                }
Note: See TracChangeset for help on using the changeset viewer.