From d0cfbcf87599ce258a24ee460a1cf33e26dc61e9 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 4 Aug 2004 02:15:22 +0000 Subject: [PATCH] only pick a default nickname if you're a server svn:r2134 --- src/or/config.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/or/config.c b/src/or/config.c index 6ce47263bd..d9f9856ecf 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -680,9 +680,11 @@ int getconfig(int argc, char **argv, or_options_t *options) { } if (options->Nickname == NULL) { - if (!(options->Nickname = get_default_nickname())) - return -1; - log_fn(LOG_INFO, "Choosing default nickname %s", options->Nickname); + if(server_mode()) { + if (!(options->Nickname = get_default_nickname())) + return -1; + log_fn(LOG_NOTICE, "Choosing default nickname %s", options->Nickname); + } } else { if (strspn(options->Nickname, LEGAL_NICKNAME_CHARACTERS) != strlen(options->Nickname)) { @@ -696,7 +698,7 @@ int getconfig(int argc, char **argv, or_options_t *options) { } } - if(options->ORPort) { /* get an IP for ourselves */ + if(server_mode()) { /* get an IP for ourselves */ if(resolve_my_address(options) < 0) result = -1; }