feat(irc): support optional SASL and NickServ auth (#511)

* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): support SASL and NickServ auth

* feat(irc): add missing fields

* feat(irc): add validation

* feat(indexers): unify and set required values

* feat(irc): add postgres migrations

* feat(irc): use nick as handlerkey

* feat(irc): use account for nickserv

* fix(irc): pg db migration
This commit is contained in:
ze0s 2022-10-27 22:25:58 +02:00 committed by GitHub
parent 4ef0408f33
commit 4bf023d030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 1404 additions and 631 deletions

View file

@ -5,9 +5,10 @@ interface IrcNetwork {
server: string;
port: number;
tls: boolean;
nick: string;
pass: string;
auth: IrcAuth; // optional
invite_command: string;
nickserv?: NickServ; // optional
channels: IrcChannel[];
connected: boolean;
connected_since: string;
@ -20,8 +21,9 @@ interface IrcNetworkCreate {
port: number;
tls: boolean;
pass: string;
nick: string;
auth: IrcAuth; // optional
invite_command: string;
nickserv?: NickServ; // optional
channels: IrcChannel[];
connected: boolean;
}
@ -48,8 +50,9 @@ interface IrcNetworkWithHealth {
port: number;
tls: boolean;
pass: string;
nick: string;
auth: IrcAuth; // optional
invite_command: string;
nickserv?: NickServ; // optional
channels: IrcChannelWithHealth[];
connected: boolean;
connected_since: string;
@ -57,7 +60,10 @@ interface IrcNetworkWithHealth {
healthy: boolean;
}
interface NickServ {
type IrcAuthMechanism = "NONE" | "SASL_PLAIN" | "NICKSERV";
interface IrcAuth {
mechanism: IrcAuthMechanism; // optional
account?: string; // optional
password?: string; // optional
}