irctk

libircclient binding for scripts
git clone https://a3nm.net/git/irctk/
Log | Files | Refs | README

commit 131754a4a667b211b8e0f229a8e0aa34ea7d0bd8
parent b195cf41d0fa30b682bdbe97f77c666c69b391a2
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 28 Jul 2012 01:09:00 +0200

show usage if arguments are invalid

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

diff --git a/irctk.c b/irctk.c @@ -410,8 +410,8 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state) break; case ARGP_KEY_END: - if (state->arg_num < 1) - /* TODO rather test if server is still null */ + if (state->arg_num < 1 || strlen(arguments->server) == 0 + || strlen(arguments->nick) == 0 || arguments->port == 0) argp_usage (state); break; }