summaryrefslogtreecommitdiff
path: root/src/char/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char/char.c')
-rw-r--r--src/char/char.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 6d23dea16..3c96077fd 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -105,7 +105,7 @@ char unknown_char_name[NAME_LENGTH] = "Unknown"; // Name to use when the request
#define TRIM_CHARS "\255\xA0\032\t\x0A\x0D " //The following characters are trimmed regardless because they cause confusion and problems on the servers. [Skotlex]
char char_name_letters[1024] = ""; // list of letters/symbols allowed (or not) in a character name. by [Yor]
-int char_per_account = 0; //Maximum charas per account (default unlimited) [Sirius]
+int char_per_account = 0; //Maximum chars per account (default unlimited) [Sirius]
int char_del_level = 0; //From which level u can delete character [Lupus]
int char_del_delay = 86400;
@@ -1338,10 +1338,10 @@ int mmo_char_sql_init(void)
{
char_db_= idb_alloc(DB_OPT_RELEASE_DATA);
- if(char_per_account == 0){
- ShowStatus("Chars per Account: 'Unlimited'.......\n");
- }else{
- ShowStatus("Chars per Account: '%d'.......\n", char_per_account);
+ if (char_per_account == 0) {
+ ShowStatus("Characters per Account: 'Unlimited'.\n");
+ } else {
+ ShowStatus("Characters per Account: '%d'.\n", char_per_account);
}
//the 'set offline' part is now in check_login_conn ...
@@ -4592,6 +4592,10 @@ int char_config_read(const char* cfgName)
safestrncpy(char_name_letters, w2, sizeof(char_name_letters));
} else if (strcmpi(w1, "chars_per_account") == 0) { //maxchars per account [Sirius]
char_per_account = atoi(w2);
+ if( char_per_account > MAX_CHARS ) {
+ ShowWarning("Max chars per account '%d' exceeded limit. Defaulting to '%d'.\n", char_per_account, MAX_CHARS);
+ char_per_account = MAX_CHARS;
+ }
} else if (strcmpi(w1, "char_del_level") == 0) { //disable/enable char deletion by its level condition [Lupus]
char_del_level = atoi(w2);
} else if (strcmpi(w1, "char_del_delay") == 0) {