about summary refs log tree commit diff
path: root/src/game/server
diff options
context:
space:
mode:
authorAlfred Eriksson <somerunce@gmail.com>2008-09-07 08:30:49 +0000
committerAlfred Eriksson <somerunce@gmail.com>2008-09-07 08:30:49 +0000
commitc3ff86330f6baa479a4d1ef79f1fd906b2a1a4a2 (patch)
tree182099f48322e9b740954daa19cc653cbc8019f6 /src/game/server
parent6dcea2c4ca59e0f1ac8450cc31550bdb35bc21b1 (diff)
downloadzcatch-c3ff86330f6baa479a4d1ef79f1fd906b2a1a4a2.tar.gz
zcatch-c3ff86330f6baa479a4d1ef79f1fd906b2a1a4a2.zip
merge from 0.4.3: lots of small stuff
Diffstat (limited to 'src/game/server')
-rw-r--r--src/game/server/hooks.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/server/hooks.cpp b/src/game/server/hooks.cpp
index 8688df28..640fab4c 100644
--- a/src/game/server/hooks.cpp
+++ b/src/game/server/hooks.cpp
@@ -153,14 +153,13 @@ void mods_message(int msgtype, int client_id)
 		
 		if(config.sv_spamprotection && p->last_setteam+time_freq()*3 > time_get())
 			return;
-			
-		p->last_setteam = time_get();
 
 		// Switch team on given client and kill/respawn him
 		if(game.controller->can_join_team(msg->team, client_id))
 		{
 			if(game.controller->can_change_team(p, msg->team))
 			{
+				p->last_setteam = time_get();
 				p->set_team(msg->team);
 				(void) game.controller->check_team_balance();
 			}