mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
feat(irc): add with network password (#639)
* feat(irc): initial add with network password * feat(irc): check irc auth obj exists
This commit is contained in:
parent
5c402b6d6c
commit
9e8672fdfe
2 changed files with 12 additions and 11 deletions
|
@ -29,18 +29,17 @@ irc:
|
||||||
announcers:
|
announcers:
|
||||||
- BOT
|
- BOT
|
||||||
settings:
|
settings:
|
||||||
|
|
||||||
- name: nick
|
- name: nick
|
||||||
type: text
|
type: text
|
||||||
required: false
|
required: true
|
||||||
label: Username
|
label: Username
|
||||||
help: Profile > Settings > External Chat Tokens > Add Device Token.
|
help: Profile > Settings > External Chat Tokens > Add Device Token.
|
||||||
|
|
||||||
- name: auth.password
|
- name: pass
|
||||||
type: secret
|
type: secret
|
||||||
required: false
|
required: true
|
||||||
label: NickServ Password
|
label: Token
|
||||||
help: NickServ password
|
help: Profile > Settings > External Chat Tokens > Token.
|
||||||
|
|
||||||
parse:
|
parse:
|
||||||
type: single
|
type: single
|
||||||
|
|
|
@ -292,7 +292,7 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
|
||||||
|
|
||||||
const network: IrcNetworkCreate = {
|
const network: IrcNetworkCreate = {
|
||||||
name: ind.irc.network,
|
name: ind.irc.network,
|
||||||
pass: "",
|
pass: formData.irc.pass || "",
|
||||||
enabled: false,
|
enabled: false,
|
||||||
connected: false,
|
connected: false,
|
||||||
server: ind.irc.server,
|
server: ind.irc.server,
|
||||||
|
@ -308,10 +308,12 @@ export function IndexerAddForm({ isOpen, toggle }: AddProps) {
|
||||||
channels: channels
|
channels: channels
|
||||||
};
|
};
|
||||||
|
|
||||||
if (formData.irc.auth.account !== "" && formData.irc.auth.password !== "") {
|
if (formData.irc.auth) {
|
||||||
network.auth.mechanism = "SASL_PLAIN";
|
if (formData.irc.auth.account !== "" && formData.irc.auth.password !== "") {
|
||||||
network.auth.account = formData.irc.auth.account;
|
network.auth.mechanism = "SASL_PLAIN";
|
||||||
network.auth.password = formData.irc.auth.password;
|
network.auth.account = formData.irc.auth.account;
|
||||||
|
network.auth.password = formData.irc.auth.password;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mutation.mutate(formData as Indexer, {
|
mutation.mutate(formData as Indexer, {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue