summaryrefslogtreecommitdiff
path: root/src/map/chat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chat.c')
-rw-r--r--src/map/chat.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/chat.c b/src/map/chat.c
index 1a0730b51..67a4dbaee 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -151,15 +151,15 @@ int chat_leavechat(struct map_session_data* sd, bool kicked)
return -1;
}
- leavechar = i;
-
clif_leavechat(cd, sd, kicked);
+ pc_setchatid(sd, 0);
+ cd->users--;
+
+ leavechar = i;
for( i = leavechar; i < cd->users; i++ )
cd->usersd[i] = cd->usersd[i+1];
- pc_setchatid(sd, 0);
- cd->users--;
if( cd->users == 0 && cd->owner->type == BL_PC )
{ // Delete empty chatroom