default nick to user - irc - Unnamed repository; edit this file 'description' t… | |
git clone git://vernunftzentrum.de/irc.git | |
Log | |
Files | |
Refs | |
README | |
--- | |
commit 8bc46324826d19a8fcf0f09a2721f8edd1ef560b | |
parent 240a558ac936ef74f05ee3558dac433d29073f0f | |
Author: Quentin Carbonneaux <[email protected]> | |
Date: Sun, 22 Jan 2017 20:47:39 -0500 | |
default nick to user | |
Diffstat: | |
irc.c | 6 ++++-- | |
1 file changed, 4 insertions(+), 2 deletions(-) | |
--- | |
diff --git a/irc.c b/irc.c | |
@@ -844,12 +844,14 @@ main(int argc, char *argv[]) | |
port = optarg; | |
break; | |
} | |
+ if (!user) | |
+ user = "anonymous"; | |
if (!nick[0] && ircnick && strlen(ircnick) < sizeof nick) | |
strcpy(nick, ircnick); | |
+ if (!nick[0] && strlen(user) < sizeof nick) | |
+ strcpy(nick, user); | |
if (!nick[0]) | |
goto usage; | |
- if (!user) | |
- user = "anonymous"; | |
tinit(); | |
err = dial(server, port); | |
if (err) |