From f05d5e1d61cf77db13d73a13f9d617d36caeab95 Mon Sep 17 00:00:00 2001 From: MrStonedOne Date: Sun, 4 Oct 2015 21:06:45 -0700 Subject: [PATCH 1/4] Adds config option for allowing webclient. Also adds a config option to restrict webclient to byond members only. --- code/controllers/configuration.dm | 7 +++++++ code/modules/client/client procs.dm | 14 ++++++++++++-- config/config.txt | 8 ++++++++ 3 files changed, 27 insertions(+), 2 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index cb111d7c063..6b6859a3a67 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -149,6 +149,9 @@ var/silent_ai = 0 var/silent_borg = 0 + var/allowwebclient = 0 + var/webclientmembersonly = 0 + var/sandbox_autoclose = 0 // close the sandbox panel after spawning an item, potentially reducing griff var/default_laws = 0 //Controls what laws the AI spawns with. @@ -350,6 +353,10 @@ world.log = newlog if("autoconvert_notes") config.autoconvert_notes = 1 + if("allow_webclient") + config.allowwebclient = 1 + if("webclient_only_byond_members") + config.webclientmembersonly = 1 if("announce_admin_logout") config.announce_admin_logout = 1 if("announce_admin_login") diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 70db67c27c5..44407ebde17 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -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. Click Here to find out more." + 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! Click Here to find out more." 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() diff --git a/config/config.txt b/config/config.txt index c1bed2e1a60..6da320568c3 100644 --- a/config/config.txt +++ b/config/config.txt @@ -102,6 +102,14 @@ HOSTEDBY Yournamehere ## Uncomment this to stop people connecting to your server without a registered ckey. (i.e. guest-* are all blocked from connecting) GUEST_BAN +## Uncomment to allow web client connections +#ALLOW_WEBCLIENT + +## Uncomment to restrict web client connections to byond members +## This makes for a nice pay gate to cut down on ban evading, as the webclient's cid system isn't that great +## byond membership starts at $10 for 3 months, so to use the webclient to evade, they would have sink 10 bucks in each evade. +#WEBCLIENT_ONLY_BYOND_MEMBERS + ## Set to jobban everyone who's key is not listed in data/whitelist.txt from Captain, HoS, HoP, CE, RD, CMO, Warden, Security, Detective, and AI positions. ## Uncomment to 1 to jobban, leave commented out to allow these positions for everyone (but see GUEST_JOBBAN above and regular jobbans) # USEWHITELIST From 0a3740c13fc22e49858b916d338f71ea0bc31734 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Sat, 10 Oct 2015 09:43:25 -0700 Subject: [PATCH 2/4] Changes webclient member checking to use IsByondMember() You can disable byond member features in preferences, something the other method checked, but this could lead to somebody not being able to get in to re-enable them. --- code/modules/client/client procs.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 44407ebde17..33c9782d3b5 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -127,7 +127,7 @@ var/next_external_rsc = 0 src << "Web client is disabled" del(src) return 0 - if (config.webclientmembersonly && !is_content_unlocked()) + if (config.webclientmembersonly && !IsByondMember())) src << "Sorry, but the web client is restricted to byond members only." del(src) return 0 @@ -185,7 +185,7 @@ var/next_external_rsc = 0 src.changes() else winset(src, "rpane.changelogb", "background-color=#eaeaea;font-style=bold") - + if (ckey in clientmessages) for (var/message in clientmessages[ckey]) src << message @@ -197,7 +197,7 @@ var/next_external_rsc = 0 ////////////// //DISCONNECT// ////////////// - + /client/Del() if(holder) adminGreet(1) From 14012f1d356dcdc02e3f1ed0e88b074b01669b37 Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Sat, 10 Oct 2015 10:05:50 -0700 Subject: [PATCH 3/4] Fixes compile error in client procs from mismatched () --- code/modules/client/client procs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 33c9782d3b5..e7d1bfc33b7 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -127,7 +127,7 @@ var/next_external_rsc = 0 src << "Web client is disabled" del(src) return 0 - if (config.webclientmembersonly && !IsByondMember())) + if (config.webclientmembersonly && !IsByondMember()) src << "Sorry, but the web client is restricted to byond members only." del(src) return 0 From cdd1cac39acf14365aa036ed37005759aee78c73 Mon Sep 17 00:00:00 2001 From: bgobandit Date: Thu, 15 Oct 2015 14:43:43 -0400 Subject: [PATCH 4/4] walking mushroom stuff --- code/modules/mob/living/simple_animal/hostile/mushroom.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 8f082395c4c..fa974cd2383 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -25,6 +25,7 @@ speed = 1 ventcrawler = 2 robust_searching = 1 + unique_name = 1 speak_emote = list("squeaks") var/powerlevel = 0 //Tracks our general strength level gained from eating other shrooms var/bruised = 0 //If someone tries to cheat the system by attacking a shroom to lower its health, punish them so that it wont award levels to shrooms that eat it @@ -158,6 +159,6 @@ for(counter=0, counter<=powerlevel, counter++) var/obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice/S = new /obj/item/weapon/reagent_containers/food/snacks/hugemushroomslice(src.loc) S.reagents.add_reagent("mushroomhallucinogen", powerlevel) - S.reagents.add_reagent("doctorsdelight", powerlevel) + S.reagents.add_reagent("omnizine", powerlevel) S.reagents.add_reagent("synaptizine", powerlevel) qdel(src)