support PASS from ConnectionParams
This commit is contained in:
parent
8656f63d09
commit
68054eacd5
2 changed files with 3 additions and 0 deletions
|
@ -31,5 +31,6 @@ class ConnectionParams(object):
|
||||||
realname: Optional[str] = None
|
realname: Optional[str] = None
|
||||||
bindhost: Optional[str] = None
|
bindhost: Optional[str] = None
|
||||||
|
|
||||||
|
password: Optional[str] = None
|
||||||
tls_verify: bool = True
|
tls_verify: bool = True
|
||||||
sasl: Optional[SASLParams] = None
|
sasl: Optional[SASLParams] = None
|
||||||
|
|
|
@ -97,6 +97,8 @@ class Server(IServer):
|
||||||
realname = self.params.realname or nickname
|
realname = self.params.realname or nickname
|
||||||
|
|
||||||
# these must remain non-awaited; reading hasn't started yet
|
# these must remain non-awaited; reading hasn't started yet
|
||||||
|
if not self.params.password is None:
|
||||||
|
self.send(build("PASS", [self.params.password]))
|
||||||
self.send(build("CAP", ["LS", "302"]))
|
self.send(build("CAP", ["LS", "302"]))
|
||||||
self.send(build("NICK", [nickname]))
|
self.send(build("NICK", [nickname]))
|
||||||
self.send(build("USER", [username, "0", "*", realname]))
|
self.send(build("USER", [username, "0", "*", realname]))
|
||||||
|
|
Loading…
Reference in a new issue