Maris Posted March 15, 2016 Share Posted March 15, 2016 JoinServerFilter is very good feature. I love it! But how can I tell the user WHY he can't join the server? For example, I'd like to show this message: Quote You left the server at night. So you can't join at day time. Wait the night and try again. Or (another example) Quote Users can join only for first 30 minutes of the gmae. Game end in 17.3 minutes. Next round at 18:00. Link to comment https://forums.kleientertainment.com/forums/topic/65432-joinserverfilter/ Share on other sites More sharing options...
Developer Diabu Posted March 16, 2016 Developer Share Posted March 16, 2016 hey @Maris, You cannot send a custom error string to the client. I'm not sure about that, but I suppose it can works if you have a client mod overriding OnNetworkDisconnect and checking for reason == ID_DST_SLOT_RESERVATION. (Yes this is also the reason sent when the player does not meet the Whitelist restrictions) Make sure that this mod is loaded before you join the server. (Using Auto downloading might not work) Link to comment https://forums.kleientertainment.com/forums/topic/65432-joinserverfilter/#findComment-734414 Share on other sites More sharing options...
Maris Posted March 16, 2016 Author Share Posted March 16, 2016 I made a mod Kindling Fire And all I need atm is this feature: local old_Filter = GLOBAL.JoinServerFilter GLOBAL.JoinServerFilter = function(user_id) local data = data_players[user_id] --my custom database if data == nil or GLOBAL.TheWorld.state.isnight or TUNING.KINDLING_ANTICHEAT_ENABLED == false then --New player or it is night or anti_cheat is disabled. return old_Filter(user_id) end if data.night_time_score ~= nil and data.night_time_score <= -MAX_SKIP_NIGHT_TIME then --Too much cheating. print("A cheater is trying to join the server:",data.name or user_id) ----->>> requested feature: GLOBAL.JoinServerFilterMessage = "You are a cheater! Now you can join only at night time." return false end return old_Filter(user_id) end Link to comment https://forums.kleientertainment.com/forums/topic/65432-joinserverfilter/#findComment-734594 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.