From ad002ae458d5a32f24c3b73be6d6a53f75d0ef49 Mon Sep 17 00:00:00 2001 From: Tobias Girstmair Date: Thu, 30 May 2024 21:09:31 +0200 Subject: [PATCH] nick is mandatory --- ircpipe.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ircpipe.c b/ircpipe.c index 0627d51..77d1318 100644 --- a/ircpipe.c +++ b/ircpipe.c @@ -392,6 +392,11 @@ int main(int argc, char **argv) { irc_help(argv[0], 1); } + if (!nick || !*nick) { + fprintf(stderr, "must provide a nick with -n\n"); + exit(1); + } + if (pass_type != NO_PASSWD && pass == NULL) { fprintf(stderr, "must set IRC_PASSWD envvar to use -p/-P\n"); exit(1); -- 2.39.3