hirc

IRC client
Log | Files | Refs

commit 578f60fc8b5128d53191fb0689c9efe75b6cd2a3
parent 0eeecece847352b7705f3441b25ce0d36df9d9d9
Author: hhvn <dev@hhvn.uk>
Date:   Tue,  3 May 2022 23:41:22 +0100

Stay silent if /bind or /alias values already exist when reading a conf

Diffstat:
Msrc/commands.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/commands.c b/src/commands.c @@ -1054,7 +1054,7 @@ command_bind) { ui_error("no such keybind: '%s'", binding); } else { - if (ui_bind(binding, cmd) == -1) + if (ui_bind(binding, cmd) == -1 && !nouich) ui_error("keybind already exists: '%s'", binding); } } @@ -1106,7 +1106,7 @@ command_alias) { ui_error("no such alias: '%s'", alias); } else { - if (alias_add(alias, cmd) == -1) + if (alias_add(alias, cmd) == -1 && !nouich) ui_error("alias already exists: '%s'", alias); } }