Merge pull request #12172 from MrStonedOne/webclientconfig

Adds config option for allowing webclient.
This commit is contained in:
Razharas
2015-10-16 21:49:50 +03:00
3 changed files with 27 additions and 2 deletions
+12 -2
View File
@@ -45,7 +45,7 @@
/client/proc/is_content_unlocked()
if(!prefs.unlock_content)
src << "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. <a href='http://www.byond.com/membership'>Click Here to find out more</a>."
src << "Become a BYOND member to access member-perks and features, as well as support the engine that makes this game possible. Only 10 bucks for 3 months! <a href='http://www.byond.com/membership'>Click Here to find out more</a>."
return 0
return 1
@@ -92,7 +92,7 @@ var/next_external_rsc = 0
TopicData = null //Prevent calls to client.Topic from connect
if(connection != "seeker") //Invalid connection type.
if(connection != "seeker" && connection != "web")//Invalid connection type.
return null
if(byond_version < MIN_CLIENT_VERSION) //Out of date client.
return null
@@ -122,6 +122,16 @@ var/next_external_rsc = 0
. = ..() //calls mob.Login()
if (connection == "web")
if (!config.allowwebclient)
src << "Web client is disabled"
del(src)
return 0
if (config.webclientmembersonly && !IsByondMember())
src << "Sorry, but the web client is restricted to byond members only."
del(src)
return 0
if( (world.address == address || !address) && !host )
host = key
world.update_status()