Merge pull request #6916 from Mloc/bs12-server

serverside fixes
This commit is contained in:
Chinsky
2014-11-02 04:47:26 +03:00
4 changed files with 8 additions and 5 deletions
+5 -2
View File
@@ -228,9 +228,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
if (findtext(key, "Guest-", 1, 7) != 1) //was findtextEx
return 0
var/i, ch, len = length(key)
var/i = 7, ch, len = length(key)
for (i = 7, i <= len, ++i)
if(copytext(key, 7, 8) == "W") //webclient
i++
for (, i <= len, ++i)
ch = text2ascii(key, i)
if (ch < 48 || ch > 57)
return 0
+1 -1
View File
@@ -274,7 +274,7 @@ var/global/datum/controller/gameticker/ticker
proc/create_characters()
for(var/mob/new_player/player in player_list)
if(player.ready && player.mind)
if(player && player.ready && player.mind)
if(player.mind.assigned_role=="AI")
player.close_spawn_windows()
player.AIize()
+1 -1
View File
@@ -105,7 +105,7 @@
/client/New(TopicData)
TopicData = null //Prevent calls to client.Topic from connect
if(connection != "seeker") //Invalid connection type.
if(!(connection in list("seeker", "web"))) //Invalid connection type.
return null
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
return null
+1 -1
View File
@@ -11,7 +11,7 @@
var/matches
if( (M.lastKnownIP == client.address) )
matches += "IP ([client.address])"
if( (M.computer_id == client.computer_id) )
if( (client.connection != "web") && (M.computer_id == client.computer_id) )
if(matches) matches += " and "
matches += "ID ([client.computer_id])"
spawn() alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!")