Implement SCRAM-SHA-256
This commit is contained in:
parent
ead3b37cf9
commit
876d9ebdd0
36 changed files with 5089 additions and 72 deletions
|
@ -39,6 +39,8 @@ func connectIRC(server *storage.Server, state *State, srcIP []byte) *irc.Client
|
|||
Nick: server.Nick,
|
||||
Username: server.Username,
|
||||
Realname: server.Realname,
|
||||
Account: server.Account,
|
||||
Password: server.Password,
|
||||
Version: fmt.Sprintf("Dispatch %s (git: %s)", version.Tag, version.Commit),
|
||||
Source: "https://github.com/khlieng/dispatch",
|
||||
}
|
||||
|
@ -57,19 +59,12 @@ func connectIRC(server *storage.Server, state *State, srcIP []byte) *irc.Client
|
|||
ircCfg.Username = hex.EncodeToString(srcIP)
|
||||
}
|
||||
|
||||
if server.Account != "" && server.Password != "" {
|
||||
ircCfg.SASL = &irc.SASLPlain{
|
||||
Username: server.Account,
|
||||
Password: server.Password,
|
||||
}
|
||||
}
|
||||
|
||||
if server.ServerPassword == "" &&
|
||||
cfg.Defaults.ServerPassword != "" &&
|
||||
server.Host == cfg.Defaults.Host {
|
||||
ircCfg.Password = cfg.Defaults.ServerPassword
|
||||
ircCfg.ServerPassword = cfg.Defaults.ServerPassword
|
||||
} else {
|
||||
ircCfg.Password = server.ServerPassword
|
||||
ircCfg.ServerPassword = server.ServerPassword
|
||||
}
|
||||
|
||||
i := irc.NewClient(&ircCfg)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue