Browse Source

Resolved a memory leak in the channel system (fixes #473)
* Added a check to preemptively stop autotrading players from creating multiple guild chat channels at server start.

aleos89 9 years ago
parent
commit
323bd72907
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/map/channel.c

+ 1 - 1
src/map/channel.c

@@ -212,7 +212,7 @@ int channel_gjoin(struct map_session_data *sd, int flag){
 	struct Channel *channel;
 	struct guild *g;
 
-	if(!sd) return -1;
+	if(!sd || (sd && sd->state.autotrade)) return -1;
 	g = sd->guild;
 	if(!g) return -2;