summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-21 15:22:38 +0000
committermomacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-21 15:22:38 +0000
commit88a2f6741ec3aee559495a219d499ecc3425a3f1 (patch)
treee7b6c78c8827b31ad65f1368170ec816d65253b2 /src
parentc308545e23a339f12f6ccab93ee744ef503db15b (diff)
downloadhercules-88a2f6741ec3aee559495a219d499ecc3425a3f1.tar.gz
hercules-88a2f6741ec3aee559495a219d499ecc3425a3f1.tar.bz2
hercules-88a2f6741ec3aee559495a219d499ecc3425a3f1.tar.xz
hercules-88a2f6741ec3aee559495a219d499ecc3425a3f1.zip
Another minor improvement on char_per_account setting (follow up to r16937). Thankyou Lemongrass for your suggestion!
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16939 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/char/char.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 3c96077fd..234a91b79 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -1338,11 +1338,7 @@ int mmo_char_sql_init(void)
{
char_db_= idb_alloc(DB_OPT_RELEASE_DATA);
- if (char_per_account == 0) {
- ShowStatus("Characters per Account: 'Unlimited'.\n");
- } else {
- ShowStatus("Characters per Account: '%d'.\n", char_per_account);
- }
+ ShowStatus("Characters per Account: '%d'.\n", char_per_account);
//the 'set offline' part is now in check_login_conn ...
//if the server connects to loginserver
@@ -4592,8 +4588,9 @@ 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);
+ if( char_per_account == 0 || char_per_account > MAX_CHARS ) {
+ 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]