summaryrefslogtreecommitdiff
path: root/src/tools/anopesmtp.cpp
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2012-10-29 13:40:25 -0400
committerAdam <Adam@anope.org>2012-10-29 13:46:21 -0400
commit6883309927a6902dd9bbca90d3aef356d8651483 (patch)
tree882a3c9faee72715e75fa3ef2c946b7d8fe7d85b /src/tools/anopesmtp.cpp
parent9c8570ac68b3bc4d94a511a9eefdbcca099679f7 (diff)
Made anopesmtp less hard to debug
Diffstat (limited to 'src/tools/anopesmtp.cpp')
-rw-r--r--src/tools/anopesmtp.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/anopesmtp.cpp b/src/tools/anopesmtp.cpp
index 2948e4d93..1f2c0febb 100644
--- a/src/tools/anopesmtp.cpp
+++ b/src/tools/anopesmtp.cpp
@@ -90,8 +90,6 @@ struct smtp_message
ano_socket_t sock;
};
-
-/* set this to 1 if you want to get a log otherwise it runs silent */
int smtp_debug = 0;
struct smtp_message smail;
@@ -107,7 +105,7 @@ static std::string get_logname(struct tm *tm = NULL)
}
strftime(timestamp, sizeof(timestamp), "%Y%m%d", tm);
- std::string name = std::string("logs/anopesmtp.") + timestamp;
+ std::string name = std::string("anopesmtp.") + timestamp;
return name;
}
@@ -445,6 +443,9 @@ int main(int argc, char *argv[])
if (argc == 1)
return 0;
+
+ if (argc == 3 && !strcmp(argv[2], "--debug"))
+ smtp_debug = 1;
char *server = strtok(argv[1], ":"), *aport;
short port;