Advertisement
Irkutsk86

ExileServer_system_network_event_onPlayerConnected

May 7th, 2024
638
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. /**
  2.  * ExileServer_system_network_event_onPlayerConnected
  3.  *
  4.  * Exile Mod
  5.  * www.exilemod.com
  6.  * © 2015 Exile Mod Team
  7.  *
  8.  * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  9.  * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  10.  */
  11.  
  12. private["_isKnownAccount"];
  13. _uid = _this select 0;
  14. _name = _this select 1;
  15. if (( "headlessclient" in _name)  || ( "HC_HAL" in _name)) exitWith {};
  16. if !(_uid in ["", "__SERVER__", "__HEADLESS__"]) then
  17. {
  18.     format["Player %1 (UID %2) connected!", _name, _uid] call ExileServer_util_log;
  19.     _isKnownAccount = format["isKnownAccount:%1", _uid] call ExileServer_system_database_query_selectSingleField;
  20.     if (_isKnownAccount) then
  21.     {
  22.         format["startAccountSession:%1:%2", _uid, _name] call ExileServer_system_database_query_fireAndForget;
  23.     }
  24.     else
  25.     {
  26.         format["createAccount:%1:%2", _uid, _name] call ExileServer_system_database_query_fireAndForget;
  27.     };
  28. };
  29. true
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement