summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/common')
-rw-r--r--src/common/HPM.c65
-rw-r--r--src/common/console.c2
-rw-r--r--src/common/core.c2
-rw-r--r--src/common/db.h22
-rw-r--r--src/common/ers.h10
-rw-r--r--src/common/grfio.c2
-rw-r--r--src/common/mapindex.c2
-rw-r--r--src/common/mmo.h97
-rw-r--r--src/common/nullpo.c17
-rw-r--r--src/common/showmsg.h85
-rw-r--r--src/common/sysinfo.c2
-rw-r--r--src/common/sysinfo.h2
12 files changed, 197 insertions, 111 deletions
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 6e73d1b2a..346748cfe 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -114,9 +114,8 @@ bool hplugin_populate(struct hplugin *plugin, const char *filename) {
for(i = 0; i < length; i++) {
void **Link;
if (!( Link = plugin_import(plugin->dll, ToLink[i].name,void **))) {
- ShowWarning("HPM:plugin_load: failed to retrieve '%s' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", ToLink[i].name, filename);
- HPM->unload(plugin);
- return false;
+ ShowFatalError("HPM:plugin_load: failed to retrieve '%s' for '"CL_WHITE"%s"CL_RESET"'!\n", ToLink[i].name, filename);
+ exit(EXIT_FAILURE);
}
*Link = ToLink[i].Ref;
}
@@ -144,15 +143,13 @@ struct hplugin *hplugin_load(const char* filename) {
if (!(plugin->dll = plugin_open(filename))) {
char buf[1024];
- ShowWarning("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"' (error: %s), skipping...\n", filename, plugin_geterror(buf));
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to load '"CL_WHITE"%s"CL_RESET"' (error: %s)!\n", filename, plugin_geterror(buf));
+ exit(EXIT_FAILURE);
}
if( !( info = plugin_import(plugin->dll, "pinfo",struct hplugin_info*) ) ) {
- ShowDebug("HPM:plugin_load: failed to retrieve 'plugin_info' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'plugin_info' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
if( !(info->type & SERVER_TYPE) ) {
@@ -161,40 +158,35 @@ struct hplugin *hplugin_load(const char* filename) {
}
if( !HPM->iscompatible(info->req_version) ) {
- ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' incompatible version '%s' -> '%s', skipping...\n", filename, info->req_version, HPM_VERSION);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' incompatible version '%s' -> '%s'!\n", filename, info->req_version, HPM_VERSION);
+ exit(EXIT_FAILURE);
}
plugin->info = info;
plugin->filename = aStrdup(filename);
if( !( import_symbol_ref = plugin_import(plugin->dll, "import_symbol",void **) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'import_symbol' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
*import_symbol_ref = HPM->import_symbol;
if( !( sql_handle = plugin_import(plugin->dll, "mysql_handle",Sql **) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'mysql_handle' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
*sql_handle = HPM->import_symbol("sql_handle",plugin->idx);
if( !( HPMi = plugin_import(plugin->dll, "HPMi",struct HPMi_interface **) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMi' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
if( !( *HPMi = plugin_import(plugin->dll, "HPMi_s",struct HPMi_interface *) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'HPMi_s' for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMi_s' for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
plugin->hpi = *HPMi;
@@ -214,37 +206,32 @@ struct hplugin *hplugin_load(const char* filename) {
anyEvent = true;
if( !anyEvent ) {
- ShowWarning("HPM:plugin_load: no events found for '"CL_WHITE"%s"CL_RESET"', skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowWarning("HPM:plugin_load: no events found for '"CL_WHITE"%s"CL_RESET"'!\n", filename);
+ exit(EXIT_FAILURE);
}
if( !HPM->populate(plugin,filename) )
return NULL;
if( !( HPMDataCheckLen = plugin_import(plugin->dll, "HPMDataCheckLen", unsigned int *) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h, skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMDataCheckLen' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h!\n", filename);
+ exit(EXIT_FAILURE);
}
if( !( HPMDataCheckVer = plugin_import(plugin->dll, "HPMDataCheckVer", int *) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheckVer' for '"CL_WHITE"%s"CL_RESET"', most likely an outdated plugin, skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMDataCheckVer' for '"CL_WHITE"%s"CL_RESET"', most likely an outdated plugin!\n", filename);
+ exit(EXIT_FAILURE);
}
if( !( HPMDataCheck = plugin_import(plugin->dll, "HPMDataCheck", struct s_HPMDataCheck *) ) ) {
- ShowWarning("HPM:plugin_load: failed to retrieve 'HPMDataCheck' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h, skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: failed to retrieve 'HPMDataCheck' for '"CL_WHITE"%s"CL_RESET"', most likely not including HPMDataCheck.h!\n", filename);
+ exit(EXIT_FAILURE);
}
// TODO: Remove the HPM->DataCheck != NULL check once login and char support is complete
if (HPM->DataCheck != NULL && !HPM->DataCheck(HPMDataCheck,*HPMDataCheckLen,*HPMDataCheckVer,plugin->info->name)) {
- ShowWarning("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' failed DataCheck, out of sync from the core (recompile plugin), skipping...\n", filename);
- HPM->unload(plugin);
- return NULL;
+ ShowFatalError("HPM:plugin_load: '"CL_WHITE"%s"CL_RESET"' failed DataCheck, out of sync from the core (recompile plugin)!\n", filename);
+ exit(EXIT_FAILURE);
}
/* id */
diff --git a/src/common/console.c b/src/common/console.c
index 97ca0650e..1eba48fa2 100644
--- a/src/common/console.c
+++ b/src/common/console.c
@@ -63,7 +63,7 @@ void display_title(void) {
ShowMessage(""CL_BG_RED""CL_BT_WHITE" | | | | __/ | | (__| |_| | | __/\\__ \\ "CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" \\_| |_/\\___|_| \\___|\\__,_|_|\\___||___/ "CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
- ShowMessage(""CL_BG_RED""CL_BT_WHITE" http://hercules.ws/board/ "CL_CLL""CL_NORMAL"\n");
+ ShowMessage(""CL_BG_RED""CL_BT_WHITE" http://herc.ws/board/ "CL_CLL""CL_NORMAL"\n");
ShowMessage(""CL_BG_RED""CL_BT_WHITE" "CL_CLL""CL_NORMAL"\n");
ShowInfo("Hercules %d-bit for %s\n", sysinfo->is64bit() ? 64 : 32, sysinfo->platform());
diff --git a/src/common/core.c b/src/common/core.c
index 8bf381589..ea028002a 100644
--- a/src/common/core.c
+++ b/src/common/core.c
@@ -250,7 +250,7 @@ static CMDLINEARG(help)
*/
static CMDLINEARG(version)
{
- ShowInfo(CL_GREEN"Website/Forum:"CL_RESET"\thttp://hercules.ws/\n");
+ ShowInfo(CL_GREEN"Website/Forum:"CL_RESET"\thttp://herc.ws/\n");
ShowInfo(CL_GREEN"IRC Channel:"CL_RESET"\tirc://irc.rizon.net/#Hercules\n");
ShowInfo("Open "CL_WHITE"readme.txt"CL_RESET" for more information.\n");
return false;
diff --git a/src/common/db.h b/src/common/db.h
index cd61e1543..4883489d7 100644
--- a/src/common/db.h
+++ b/src/common/db.h
@@ -71,10 +71,10 @@
* @see #db_custom_release(DBRelease)
*/
typedef enum DBRelease {
- DB_RELEASE_NOTHING = 0,
- DB_RELEASE_KEY = 1,
- DB_RELEASE_DATA = 2,
- DB_RELEASE_BOTH = 3
+ DB_RELEASE_NOTHING = 0x0,
+ DB_RELEASE_KEY = 0x1,
+ DB_RELEASE_DATA = 0x2,
+ DB_RELEASE_BOTH = DB_RELEASE_KEY|DB_RELEASE_DATA,
} DBRelease;
/**
@@ -127,13 +127,13 @@ typedef enum DBType {
* @see #db_alloc(const char *,int,DBType,DBOptions,unsigned short)
*/
typedef enum DBOptions {
- DB_OPT_BASE = 0,
- DB_OPT_DUP_KEY = 1,
- DB_OPT_RELEASE_KEY = 2,
- DB_OPT_RELEASE_DATA = 4,
- DB_OPT_RELEASE_BOTH = 6,
- DB_OPT_ALLOW_NULL_KEY = 8,
- DB_OPT_ALLOW_NULL_DATA = 16,
+ DB_OPT_BASE = 0x00,
+ DB_OPT_DUP_KEY = 0x01,
+ DB_OPT_RELEASE_KEY = 0x02,
+ DB_OPT_RELEASE_DATA = 0x04,
+ DB_OPT_RELEASE_BOTH = DB_OPT_RELEASE_KEY|DB_OPT_RELEASE_DATA,
+ DB_OPT_ALLOW_NULL_KEY = 0x08,
+ DB_OPT_ALLOW_NULL_DATA = 0x10,
} DBOptions;
/**
diff --git a/src/common/ers.h b/src/common/ers.h
index 85ddfed7a..0117237d7 100644
--- a/src/common/ers.h
+++ b/src/common/ers.h
@@ -71,11 +71,11 @@
#endif /* not ERS_ALIGN_ENTRY */
enum ERSOptions {
- ERS_OPT_NONE = 0x0,
- ERS_OPT_CLEAR = 0x1,/* silently clears any entries left in the manager upon destruction */
- ERS_OPT_WAIT = 0x2,/* wait for entries to come in order to list! */
- ERS_OPT_FREE_NAME = 0x4,/* name is dynamic memory, and should be freed */
- ERS_OPT_CLEAN = 0x8,/* clears used memory upon ers_free so that its all new to be reused on the next alloc */
+ ERS_OPT_NONE = 0x00,
+ ERS_OPT_CLEAR = 0x01,/* silently clears any entries left in the manager upon destruction */
+ ERS_OPT_WAIT = 0x02,/* wait for entries to come in order to list! */
+ ERS_OPT_FREE_NAME = 0x04,/* name is dynamic memory, and should be freed */
+ ERS_OPT_CLEAN = 0x08,/* clears used memory upon ers_free so that its all new to be reused on the next alloc */
ERS_OPT_FLEX_CHUNK = 0x10,/* signs that it should look for its own cache given it'll have a dynamic chunk size, so that it doesn't affect the other ERS it'd otherwise be sharing */
/* Compound, is used to determine whether it should be looking for a cache of matching options */
diff --git a/src/common/grfio.c b/src/common/grfio.c
index e95163569..41a888267 100644
--- a/src/common/grfio.c
+++ b/src/common/grfio.c
@@ -36,8 +36,8 @@ typedef struct FILELIST {
} FILELIST;
#define FILELIST_TYPE_FILE 0x01 // entry is a file
-#define FILELIST_TYPE_ENCRYPT_HEADER 0x04 // encryption mode 1 (header DES only)
#define FILELIST_TYPE_ENCRYPT_MIXED 0x02 // encryption mode 0 (header DES + periodic DES/shuffle)
+#define FILELIST_TYPE_ENCRYPT_HEADER 0x04 // encryption mode 1 (header DES only)
//gentry ... > 0 : data read from a grf file (gentry_table[gentry-1])
//gentry ... 0 : data read from a local file (data directory)
diff --git a/src/common/mapindex.c b/src/common/mapindex.c
index 035518f68..e07ccd679 100644
--- a/src/common/mapindex.c
+++ b/src/common/mapindex.c
@@ -193,7 +193,7 @@ void mapindex_defaults(void) {
mapindex = &mapindex_s;
/* TODO: place it in inter-server.conf? */
- snprintf(mapindex->config_file, 80, "%s","db/map_index.txt");
+ snprintf(mapindex->config_file, sizeof(mapindex->config_file), "%s","db/map_index.txt");
/* */
mapindex->db = NULL;
mapindex->num = 0;
diff --git a/src/common/mmo.h b/src/common/mmo.h
index 48eba0041..766ccf182 100644
--- a/src/common/mmo.h
+++ b/src/common/mmo.h
@@ -7,6 +7,7 @@
#include <time.h>
+#include "../config/core.h"
#include "../common/cbasetypes.h"
#include "../common/db.h"
@@ -118,15 +119,16 @@
#define MAX_STORAGE 600
#define MAX_GUILD_STORAGE 600
#define MAX_PARTY 12
-#define MAX_GUILD (16+10*6) // Increased max guild members +6 per 1 extension levels [Lupus]
-#define MAX_GUILDPOSITION 20 // Increased max guild positions to accommodate for all members [Valaris] (removed) [PoW]
+#define BASE_GUILD_SIZE 16 // Base guild members (without GD_EXTENSION)
+#define MAX_GUILD (BASE_GUILD_SIZE+10*6) // Increased max guild members +6 per 1 extension levels [Lupus]
+#define MAX_GUILDPOSITION 20 // Increased max guild positions to accomodate for all members [Valaris] (removed) [PoW]
#define MAX_GUILDEXPULSION 32
#define MAX_GUILDALLIANCE 16
-#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
+#define MAX_GUILDSKILL 15 // Increased max guild skills because of new skills [Sara-chan]
#define MAX_GUILDLEVEL 50
-#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
-#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
-#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
+#define MAX_GUARDIANS 8 // Local max per castle. [Skotlex]
+#define MAX_QUEST_OBJECTIVES 3 // Max quest objectives for a quest
+#define MAX_START_ITEMS 32 // Max number of items allowed to be given to a char whenever it's created. [mkbu95]
// for produce
#define MIN_ATTRIBUTE 0
@@ -189,6 +191,16 @@
#define EL_CLASS_BASE 2114
#define EL_CLASS_MAX (EL_CLASS_BASE+MAX_ELEMENTAL_CLASS-1)
+// The following system marks a different job ID system used by the map server,
+// which makes a lot more sense than the normal one. [Skotlex]
+// These marks the "level" of the job.
+#define JOBL_2_1 0x100 //256
+#define JOBL_2_2 0x200 //512
+#define JOBL_2 0x300
+#define JOBL_UPPER 0x1000 //4096
+#define JOBL_BABY 0x2000 //8192
+#define JOBL_THIRD 0x4000 //16384
+
struct HPluginData;
enum item_types {
@@ -298,6 +310,49 @@ enum e_item_bound_type {
IBT_MAX = 0x4,
};
+enum {
+ OPTION_NOTHING = 0x00000000,
+ OPTION_SIGHT = 0x00000001,
+ OPTION_HIDE = 0x00000002,
+ OPTION_CLOAK = 0x00000004,
+ OPTION_FALCON = 0x00000010,
+ OPTION_RIDING = 0x00000020,
+ OPTION_INVISIBLE = 0x00000040,
+ OPTION_ORCISH = 0x00000800,
+ OPTION_WEDDING = 0x00001000,
+ OPTION_RUWACH = 0x00002000,
+ OPTION_CHASEWALK = 0x00004000,
+ OPTION_FLYING = 0x00008000, //Note that clientside Flying and Xmas are 0x8000 for clients prior to 2007.
+ OPTION_XMAS = 0x00010000,
+ OPTION_TRANSFORM = 0x00020000,
+ OPTION_SUMMER = 0x00040000,
+ OPTION_DRAGON1 = 0x00080000,
+ OPTION_WUG = 0x00100000,
+ OPTION_WUGRIDER = 0x00200000,
+ OPTION_MADOGEAR = 0x00400000,
+ OPTION_DRAGON2 = 0x00800000,
+ OPTION_DRAGON3 = 0x01000000,
+ OPTION_DRAGON4 = 0x02000000,
+ OPTION_DRAGON5 = 0x04000000,
+ OPTION_HANBOK = 0x08000000,
+ OPTION_OKTOBERFEST = 0x10000000,
+
+#ifndef NEW_CARTS
+ OPTION_CART1 = 0x00000008,
+ OPTION_CART2 = 0x00000080,
+ OPTION_CART3 = 0x00000100,
+ OPTION_CART4 = 0x00000200,
+ OPTION_CART5 = 0x00000400,
+
+ /* compound constant for older carts */
+ OPTION_CART = OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5,
+#endif
+
+ // compound constants
+ OPTION_DRAGON = OPTION_DRAGON1|OPTION_DRAGON2|OPTION_DRAGON3|OPTION_DRAGON4|OPTION_DRAGON5,
+ OPTION_COSTUME = OPTION_WEDDING|OPTION_XMAS|OPTION_SUMMER|OPTION_HANBOK|OPTION_OKTOBERFEST,
+};
+
struct s_skill {
unsigned short id;
unsigned char lv;
@@ -677,6 +732,12 @@ enum { //Change Member Infos
GMI_LEVEL,
};
+enum guild_permission { // Guild permissions
+ GPERM_INVITE = 0x01,
+ GPERM_EXPEL = 0x10,
+ GPERM_BOTH = GPERM_INVITE|GPERM_EXPEL,
+};
+
enum {
GD_SKILLBASE=10000,
GD_APPROVAL=10000,
@@ -927,6 +988,30 @@ enum e_pc_reg_loading {
PRL_ALL = 0xFF,
};
+/**
+ * Values to be used as operation_type in chrif_char_ask_name
+ */
+enum zh_char_ask_name_type {
+ CHAR_ASK_NAME_BLOCK = 1, // account block
+ CHAR_ASK_NAME_BAN = 2, // account ban
+ CHAR_ASK_NAME_UNBLOCK = 3, // account unblock
+ CHAR_ASK_NAME_UNBAN = 4, // account unban
+ CHAR_ASK_NAME_CHANGESEX = 5, // change sex
+ CHAR_ASK_NAME_CHARBAN = 6, // character ban
+ CHAR_ASK_NAME_CHARUNBAN = 7, // character unban
+ CHAR_ASK_NAME_CHANGECHARSEX = 8, // change character sex
+};
+
+/**
+ * Values to be used as answer in chrig_char_ask_name_answer
+ */
+enum hz_char_ask_name_answer {
+ CHAR_ASK_NAME_ANS_DONE = 0, // login-server request done
+ CHAR_ASK_NAME_ANS_NOTFOUND = 1, // player not found
+ CHAR_ASK_NAME_ANS_GMLOW = 2, // gm level too low
+ CHAR_ASK_NAME_ANS_OFFLINE = 3, // login-server offline
+};
+
/* packet size constant for itemlist */
#if MAX_INVENTORY > MAX_STORAGE && MAX_INVENTORY > MAX_CART
#define MAX_ITEMLIST MAX_INVENTORY
diff --git a/src/common/nullpo.c b/src/common/nullpo.c
index e61d52257..97b206835 100644
--- a/src/common/nullpo.c
+++ b/src/common/nullpo.c
@@ -8,7 +8,11 @@
#include <stdio.h>
#include <stdarg.h>
+#include <stdlib.h>
#include <string.h>
+#ifdef __GNUC__
+#include <execinfo.h>
+#endif
#include "../common/showmsg.h"
@@ -24,6 +28,12 @@ struct nullpo_interface nullpo_s;
* @param title Message title to display (i.e. failed assertion or nullpo info)
*/
void assert_report(const char *file, int line, const char *func, const char *targetname, const char *title) {
+#ifdef __GNUC__
+ void *array[10];
+ int size;
+ char **strings;
+ int i;
+#endif
if (file == NULL)
file = "??";
@@ -32,6 +42,13 @@ void assert_report(const char *file, int line, const char *func, const char *tar
ShowError("--- %s --------------------------------------------\n", title);
ShowError("%s:%d: '%s' in function `%s'\n", file, line, targetname, func);
+#ifdef __GNUC__
+ size = backtrace (array, 10);
+ strings = backtrace_symbols (array, size);
+ for (i = 0; i < size; i++)
+ ShowError("%s\n", strings[i]);
+ free (strings);
+#endif
ShowError("--- end %s ----------------------------------------\n", title);
}
diff --git a/src/common/showmsg.h b/src/common/showmsg.h
index 48e763c25..0624f1786 100644
--- a/src/common/showmsg.h
+++ b/src/common/showmsg.h
@@ -23,58 +23,55 @@
// \033[0m : reset color parameter
// \033[1m : use bold for font
-#define CL_RESET "\033[0m"
-#define CL_CLS "\033[2J"
-#define CL_CLL "\033[K"
+#define CL_RESET "\033[0m"
+#define CL_CLS "\033[2J"
+#define CL_CLL "\033[K"
// font settings
-#define CL_BOLD "\033[1m"
-#define CL_NORM CL_RESET
-#define CL_NORMAL CL_RESET
-#define CL_NONE CL_RESET
-// foreground color and bold font (bright color on windows)
-#define CL_WHITE "\033[1;37m"
-#define CL_GRAY "\033[1;30m"
-#define CL_RED "\033[1;31m"
-#define CL_GREEN "\033[1;32m"
-#define CL_YELLOW "\033[1;33m"
-#define CL_BLUE "\033[1;34m"
-#define CL_MAGENTA "\033[1;35m"
-#define CL_CYAN "\033[1;36m"
+#define CL_BOLD "\033[1m"
+#define CL_NORM CL_RESET
+#define CL_NORMAL CL_RESET
+#define CL_NONE CL_RESET
// background color
-#define CL_BG_BLACK "\033[40m"
-#define CL_BG_RED "\033[41m"
-#define CL_BG_GREEN "\033[42m"
-#define CL_BG_YELLOW "\033[43m"
-#define CL_BG_BLUE "\033[44m"
-#define CL_BG_MAGENTA "\033[45m"
-#define CL_BG_CYAN "\033[46m"
-#define CL_BG_WHITE "\033[47m"
+#define CL_BG_BLACK "\033[40m"
+#define CL_BG_RED "\033[41m"
+#define CL_BG_GREEN "\033[42m"
+#define CL_BG_YELLOW "\033[43m"
+#define CL_BG_BLUE "\033[44m"
+#define CL_BG_MAGENTA "\033[45m"
+#define CL_BG_CYAN "\033[46m"
+#define CL_BG_WHITE "\033[47m"
// foreground color and normal font (normal color on windows)
-#define CL_LT_BLACK "\033[0;30m"
-#define CL_LT_RED "\033[0;31m"
-#define CL_LT_GREEN "\033[0;32m"
-#define CL_LT_YELLOW "\033[0;33m"
-#define CL_LT_BLUE "\033[0;34m"
-#define CL_LT_MAGENTA "\033[0;35m"
-#define CL_LT_CYAN "\033[0;36m"
-#define CL_LT_WHITE "\033[0;37m"
+#define CL_LT_BLACK "\033[0;30m"
+#define CL_LT_RED "\033[0;31m"
+#define CL_LT_GREEN "\033[0;32m"
+#define CL_LT_YELLOW "\033[0;33m"
+#define CL_LT_BLUE "\033[0;34m"
+#define CL_LT_MAGENTA "\033[0;35m"
+#define CL_LT_CYAN "\033[0;36m"
+#define CL_LT_WHITE "\033[0;37m"
// foreground color and bold font (bright color on windows)
-#define CL_BT_BLACK "\033[1;30m"
-#define CL_BT_RED "\033[1;31m"
-#define CL_BT_GREEN "\033[1;32m"
-#define CL_BT_YELLOW "\033[1;33m"
-#define CL_BT_BLUE "\033[1;34m"
-#define CL_BT_MAGENTA "\033[1;35m"
-#define CL_BT_CYAN "\033[1;36m"
-#define CL_BT_WHITE "\033[1;37m"
+#define CL_BT_BLACK "\033[1;30m"
+#define CL_BT_RED "\033[1;31m"
+#define CL_BT_GREEN "\033[1;32m"
+#define CL_BT_YELLOW "\033[1;33m"
+#define CL_BT_BLUE "\033[1;34m"
+#define CL_BT_MAGENTA "\033[1;35m"
+#define CL_BT_CYAN "\033[1;36m"
+#define CL_BT_WHITE "\033[1;37m"
-#define CL_WTBL "\033[37;44m" // white on blue
-#define CL_XXBL "\033[0;44m" // default on blue
-#define CL_PASS "\033[0;32;42m" // green on green
+// foreground color and bold font (bright color on windows)
+#define CL_WHITE CL_BT_WHITE
+#define CL_GRAY CL_BT_BLACK
+#define CL_RED CL_BT_RED
+#define CL_GREEN CL_BT_GREEN
+#define CL_YELLOW CL_BT_YELLOW
+#define CL_BLUE CL_BT_BLUE
+#define CL_MAGENTA CL_BT_MAGENTA
+#define CL_CYAN CL_BT_CYAN
-#define CL_SPACE " " // space equivalent of the print messages
+#define CL_SPACE " " // space aquivalent of the print messages
enum msg_type {
MSG_NONE,
diff --git a/src/common/sysinfo.c b/src/common/sysinfo.c
index a1dbed4d1..7edc5c72e 100644
--- a/src/common/sysinfo.c
+++ b/src/common/sysinfo.c
@@ -1,6 +1,6 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-// Base Author: Haru @ http://hercules.ws
+// Base Author: Haru @ http://herc.ws
/// See sysinfo.h for a description of this file
diff --git a/src/common/sysinfo.h b/src/common/sysinfo.h
index 70f665071..8c8f6dbe6 100644
--- a/src/common/sysinfo.h
+++ b/src/common/sysinfo.h
@@ -1,6 +1,6 @@
// Copyright (c) Hercules Dev Team, licensed under GNU GPL.
// See the LICENSE file
-// Base Author: Haru @ http://hercules.ws
+// Base Author: Haru @ http://herc.ws
#ifndef COMMON_SYSINFO_H
#define COMMON_SYSINFO_H