瀏覽代碼

Free snapshot handle on disconnect / backfill

It's rare (if at all even possible) for a client to have messages in
their StringMap when disconnecting, but we might as well be safe if it
does happen.
nosoop 6 年之前
父節點
當前提交
0aa75f30a2
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      scripting/simple-chatprocessor.sp

+ 3 - 1
scripting/simple-chatprocessor.sp

@@ -13,7 +13,7 @@
 
 #pragma newdecls required
 
-#define PLUGIN_VERSION "0.1.3"
+#define PLUGIN_VERSION "0.1.4"
 public Plugin myinfo = {
 	name = "[CSRD] Simple Chat Processor",
 	author = "nosoop (based off of Simple Plugins' implementation)",
@@ -85,6 +85,8 @@ public void OnClientDisconnect(int client) {
 				
 				delete clientList;
 			}
+			delete messages;
+			
 			g_QueuedMessages[client].Clear();
 		}
 		delete g_QueuedMessages[client];