diff options
| author | Quentin Carbonneaux | 2017-01-22 20:47:39 -0500 |
|---|---|---|
| committer | Quentin Carbonneaux | 2017-01-22 20:47:39 -0500 |
| commit | 8bc46324826d19a8fcf0f09a2721f8edd1ef560b (patch) | |
| tree | 51eb06acc80b466e440dc06352323d5604be2783 | |
| parent | 240a558ac936ef74f05ee3558dac433d29073f0f (diff) | |
default nick to user
| -rw-r--r-- | irc.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |
