summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-02-07 21:40:00 -0800
committerBen Longbons <b.r.longbons@gmail.com>2014-02-07 21:42:43 -0800
commit7a15a3efe85837d52d950cc9f895eadcc9eb6be1 (patch)
treed941f22af3d524eec70382d8470f3f14418916fa /src/login
parentf6a91ce07b382dd79c1e42dbc84e2694d83cfc01 (diff)
downloadtmwa-7a15a3efe85837d52d950cc9f895eadcc9eb6be1.tar.gz
tmwa-7a15a3efe85837d52d950cc9f895eadcc9eb6be1.tar.bz2
tmwa-7a15a3efe85837d52d950cc9f895eadcc9eb6be1.tar.xz
tmwa-7a15a3efe85837d52d950cc9f895eadcc9eb6be1.zip
Name the terminal escapes
Diffstat (limited to 'src/login')
-rw-r--r--src/login/login.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/login/login.cpp b/src/login/login.cpp
index ba247b6..b1d37dc 100644
--- a/src/login/login.cpp
+++ b/src/login/login.cpp
@@ -23,6 +23,7 @@
#include "../io/cxxstdio.hpp"
#include "../io/lock.hpp"
#include "../io/read.hpp"
+#include "../io/tty.hpp"
#include "../common/config_parse.hpp"
#include "../common/core.hpp"
@@ -537,7 +538,7 @@ int mmo_auth_init(void)
{
// no account file -> no account -> no login, including char-server (ERROR)
// not anymore! :-)
- PRINTF("\033[1;31mmmo_auth_init: Accounts file [%s] not found.\033[0m\n",
+ PRINTF(SGR_BOLD SGR_RED "mmo_auth_init: Accounts file [%s] not found." SGR_RESET "\n",
account_filename);
return 0;
}
@@ -2693,8 +2694,8 @@ bool lan_ip_check(IP4Address p)
{
bool lancheck = lan_subnet.covers(p);
- PRINTF("LAN test (result): %s source\033[0m.\n",
- (lancheck) ? "\033[1;36mLAN" : "\033[1;32mWAN");
+ PRINTF("LAN test (result): %s.\n",
+ (lancheck) ? SGR_BOLD SGR_CYAN "LAN source" SGR_RESET : SGR_BOLD SGR_GREEN "WAN source" SGR_RESET);
return lancheck;
}
@@ -3193,7 +3194,7 @@ bool lan_check()
PRINTF("LAN test of LAN IP of the char-server: ");
if (!lan_ip_check(lan_char_ip))
{
- PRINTF("\033[1;31m***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network\033[0m\n");
+ PRINTF(SGR_BOLD SGR_RED "***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network" SGR_RESET "\n");
LOGIN_LOG("***ERROR: LAN IP of the char-server doesn't belong to the specified Sub-network.\n");
return false;
}
@@ -3897,7 +3898,7 @@ int do_init(int argc, ZString *argv)
LOGIN_LOG("The login-server is ready (Server is listening on the port %d).\n",
login_port);
- PRINTF("The login-server is \033[1;32mready\033[0m (Server is listening on the port %d).\n\n",
+ PRINTF("The login-server is " SGR_BOLD SGR_GREEN "ready" SGR_RESET " (Server is listening on the port %d).\n\n",
login_port);
return 0;