From 6073dd60b9946a8aafa7a86bcc748d300d8aa5f5 Mon Sep 17 00:00:00 2001
From: glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>
Date: Sun, 7 Apr 2013 09:55:04 +0000
Subject: [PATCH] -Follow up r17232 fix wrong index assignement in deleting
 chan. (issue created in r17232 sorry) rechange unwanted chande for pincode
 default value.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17233 54d463be-8e91-2dee-dedb-b68131a5f0ec
---
 conf/char_athena.conf |  8 ++++----
 src/map/clif.c        | 10 ++++------
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/conf/char_athena.conf b/conf/char_athena.conf
index 44ee694e1a..9c7d7dedb6 100644
--- a/conf/char_athena.conf
+++ b/conf/char_athena.conf
@@ -9,7 +9,7 @@ userid: s1
 passwd: p1
 
 // Server name, use alternative character such as ASCII 160 for spaces.
-// NOTE: Do not use spaces or any of these characters which are not allowed in 
+// NOTE: Do not use spaces or any of these characters which are not allowed in
 //       Windows filenames \/:*?"<>|
 //       ... or else guild emblems won't work client-side!
 server_name: rAthena
@@ -93,7 +93,7 @@ gm_allow_group: 99
 // On SQL servers, it applies to guilds (character save interval is defined on the map config)
 autosave_time: 60
 
-// Display information on the console whenever characters/guilds/parties/pets are loaded/saved? 
+// Display information on the console whenever characters/guilds/parties/pets are loaded/saved?
 save_log: yes
 
 // Start point, Map name followed by coordinates (x,y)
@@ -114,7 +114,7 @@ fame_list_blacksmith: 10
 fame_list_taekwon: 10
 
 // Guild earned exp modifier.
-// Adjusts taxed exp before adding it to the guild's exp. For example, if set 
+// Adjusts taxed exp before adding it to the guild's exp. For example, if set
 // to 200, the guild receives double the player's taxed exp.
 guild_exp_rate: 100
 
@@ -165,7 +165,7 @@ db_path: db
 // NOTE: Requires client 2011-03-09aragexeRE or newer.
 // A window is opened before you can select your character and you will have to enter a pincode by using only your mouse.
 // Default: yes
-pincode_enabled: no
+pincode_enabled: yes
 
 // How often does a user have to change his pincode?
 // 0: never (default)
diff --git a/src/map/clif.c b/src/map/clif.c
index d6c1f970e8..0976301bb6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -5585,10 +5585,9 @@ void clif_chsys_left(struct raChSysCh *channel, struct map_session_data *sd) {
 		for( i = 0; i < sd->channel_count; i++ ) {
 			if( sd->channels[i] == NULL )
 				continue;
-			if( cursor != i ) {
+			if( cursor != i )
 				sd->channels[cursor] = sd->channels[i];
-				cursor++;
-			}
+			cursor++;
 		}
 		if ( !(sd->channel_count = cursor) ) {
 			aFree(sd->channels);
@@ -5612,10 +5611,9 @@ void clif_chsys_delete(struct raChSysCh *channel) {
 				for( i = 0; i < sd->channel_count; i++ ) { //move down links
 					if( sd->channels[i] == NULL )
 						continue;
-					if( cursor != i ) {
+					if( cursor != i )
 						sd->channels[cursor] = sd->channels[i];
-						cursor++;
-					}
+					cursor++;
 				}
 				if ( !(sd->channel_count = cursor) ) { //news chan count = total
 					aFree(sd->channels);