hedgewars/CCHandlers.inc
changeset 205 8d9aff55e6ab
parent 192 b644f61e803f
child 263 36379e6abcdd
--- a/hedgewars/CCHandlers.inc	Wed Oct 25 19:41:14 2006 +0000
+++ b/hedgewars/CCHandlers.inc	Thu Oct 26 16:08:29 2006 +0000
@@ -31,6 +31,18 @@
 GameState:= gsExit
 end;
 
+procedure chCheckProto(var s: shortstring);
+var i, c: integer;
+begin
+if isDeveloperMode then
+   begin
+   val(s, i, c);
+   if (c <> 0) or (i = 0) then exit;
+   TryDo(i <= cNetProtoVersion, 'Protocol version mismatch: engine is too old', true);
+   TryDo(i >= cNetProtoVersion, 'Protocol version mismatch: engine is too new', true)
+   end
+end;
+
 procedure chAddTeam(var s: shortstring);
 const TeamsCount: Longword = 0;
 begin