Player gets kicked before usermessage is sent on one server but not the other.

So basically I have my test server working 100%… When the banned player joins he gets the message and then kicked. But, when I upload this to my live server, people join then it kicks them, it never sends the message. Why could this be? :S

Can we see the code you are using?

[lua]
–server
function KickBanPlayer( ply, server, length, left, reason, admin )
SendUserMessage( “SendBanInfo”, ply, server, length, left, reason, admin )

timer.Create( "Ban_" .. ply:Nick(), 1, 1, function()
	gatekeeper.Drop(ply:UserID(), "Banned for " .. tostring( left ) .. " minutes! More info in console" )
end )

end
–bunch of code to figure out if he’s banned, it’s linked to PlayerInitialSpawn

–client
usermessage.Hook( “SendBanInfo”, function( um )
local server, length, left, reason, admin = um:ReadString(), um:ReadLong(), um:ReadLong(), um:ReadString(), um:ReadString()

if length == 0 then length, left = "Permanent", "Never" else length, left = tostring( length ), tostring( left ) end

chat.AddText( evolve.colors.red,

[[----------------------------------------------------------
Appeal your ban at: ]], evolve.colors.blue, “”, evolve.colors.red, [[

Server: ]], evolve.colors.blue, server, evolve.colors.red, [[

Length: ]], evolve.colors.blue, length, evolve.colors.red, [[

Time Left: ]], evolve.colors.blue, left, evolve.colors.red, [[

Reason: ]], evolve.colors.blue, reason, evolve.colors.red, [[

Admin who banned you: ]], evolve.colors.blue, admin, evolve.colors.red, [[
----------------------------------------------------------]] )
end )
[/lua]

If it is working on a development server and not the live server then it is not the code that should be focused on but rather what environment variables differentiate between the two that could cause something to have different results on another.

Any ideas on what could cause this? The servers are basically 90% or more exactly the same due to somethings not being on the live server. ( Not relevant to this script )

I remember this, I think it has something to do with some gatekeeper module?

I’m not sure, I just remember that for some reason :\

Also, you should be passing the player and ‘left’ as an argument to the timer rather then just inferring that it will be allocated to the same scope automatically, but that wouldn’t cause the issue.

You may also want to check if the player is ‘valid’.

[editline]16th June 2012[/editline]

Also, what I said is just me picking at your code- it will not resolve any issue as the issue is caused by things differentiating between your servers.

does the player even get time to read the message?

If you had taken a good look at the code, you would see that the drop message given by gatekeeper tells the user to look at the console, where the text that was dumped into the chat would appear.

[editline]17th June 2012[/editline]

Could you explain the difference between your test server and live server? All I can figure is that your test server is hosted locally and the live server someplace else. Don’t take this for a fact, but if that is the case, perhaps the usermessage takes longer to send to the clients than it takes to kick them (one second). Try increasing the timer to wait five seconds and see what happens.

thats silly, a lot of players don’t know how to use the console as they don’t have a reason to…

Well yes, as Bletotum says, it’s supposed to be sent to their console. They are supposed to get the message then get kicked and be like “what? I was just banned? Why???” then check their console for all the information.

Yes, unless they have a ping over ~900.