Merge branch 'master' into terencehill/welcome_dialog_translatable
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 097cafda03813137afac5c0c28f57fe0c6841c8d..bacb82e071429c219127ce07e5cc15888d39ff57 100644 (file)
@@ -1174,6 +1174,9 @@ void ClientConnect(entity this)
 
        MUTATOR_CALLHOOK(ClientConnect, this);
 
+       if (player_count == 1)
+               localcmd("\nsv_hook_firstjoin\n");
+
        if (IS_REAL_CLIENT(this) && !IS_PLAYER(this) && !autocvar_g_campaign)
                CS(this).motd_actived_time = -1; // the welcome message is shown by the client
 }
@@ -1242,6 +1245,9 @@ void ClientDisconnect(entity this)
        player_powerups_remove_all(this); // stop powerup sound
 
        ONREMOVE(this);
+
+       if (player_count == 0)
+               localcmd("\nsv_hook_lastleave\n");
 }
 
 void ChatBubbleThink(entity this)