Jump to content

Recommended Posts

Posted

I am currently trying to use the dcs lua API to manage a server.

 

When the onPlayerTryConnect() function is called i handle it in a lua script.

 

According to your documentation located at 'DCS World OpenBeta/API/DCS_ControlAPI.html', if you return false and a string it should give the player a message as per the string you return.

 

the code that i am talking about is as follows (i have simplified the code for space reasons):

-- start of code snippet

 

object.onPlayerTryConnect = function()

local message = "You cannot join the server right now, please try again in a few minutes"

return false, message

end

 

DCS.setUserCallbacks(object)

 

-- end of code snippet

 

This does stop the player from connecting to the server as intended, it does not however display the message i intend to display. Instead it tells the player that they are banned!

I've had a lot of questions from people asking why they are banned from the server when i did not ban them and i have finally tracked down why.

 

If you guys could shed some light on this matter that would be perfect. Also i would like to know if you will be including a lua function to control the newly implemented banning feature in dcs multiplayer

  • ED Team
Posted (edited)

Yes, the network sends net.ERR_BANNED in this case.

I added a special error code net.ERR_REFUSED to the internal version.

Edited by c0ff

Dmitry S. Baikov @ Eagle Dynamics

LockOn FC2 Soundtrack Remastered out NOW everywhere - https://band.link/LockOnFC2.

Posted (edited)
Yes, the network sends net.ERR_BANNED in this case.

I added a special error code net.ERR_REFUSED to the internal version.

 

Excellent, can we be expecting this fix in the next OB update?

 

EDIT: Forgot to say thanks, thats what happens when you do stuff at 3am :)

Edited by EpicNinjaCheese
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...