Adds config option for allowing webclient.

Also adds a config option to restrict webclient to byond members only.
This commit is contained in:
MrStonedOne
2015-10-04 21:06:45 -07:00
parent 4027a4cb70
commit f05d5e1d61
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 && !is_content_unlocked())
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()