diff --git a/baystation12.dme b/baystation12.dme index 29c3bf3a45..3b378a6e61 100644 --- a/baystation12.dme +++ b/baystation12.dme @@ -138,7 +138,6 @@ #include "code\datums\diseases\advance\symptoms\weight.dm" #include "code\datums\helper_datums\construction_datum.dm" #include "code\datums\helper_datums\events.dm" -#include "code\datums\helper_datums\getrev.dm" #include "code\datums\helper_datums\global_iterator.dm" #include "code\datums\helper_datums\teleport.dm" #include "code\datums\helper_datums\topic_input.dm" diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm deleted file mode 100644 index 6d81631890..0000000000 --- a/code/datums/helper_datums/getrev.dm +++ /dev/null @@ -1,96 +0,0 @@ -/* - * This datum gets revision info from local svn 'entries' file - * Path to the directory containing it should be in 'config/svndir.txt' file - * - */ - -var/global/datum/getrev/revdata = new("config/svndir.txt") - -//Oh yeah, I'm an OOP fag, lalala -/datum/getrev - var/revision - var/commiter - var/svndirpath - var/revhref - - proc/abort() - spawn() - del src - - New(filename) - ..() - var/list/Lines = file2list(filename) - if(!Lines.len) return abort() - for(var/t in Lines) - if(!t) continue - t = trim(t) - if (length(t) == 0) - continue - else if (copytext(t, 1, 2) == "#") - continue - var/pos = findtext(t, " ") - var/name = null - var/value = null - if (pos) - name = lowertext(copytext(t, 1, pos)) - value = copytext(t, pos + 1) - else - name = lowertext(t) - if(!name) - continue - switch(name) - if("svndir") - svndirpath = value - if("revhref") - revhref = value - - if(svndirpath && fexists(svndirpath) && fexists("[svndirpath]/entries") && isfile(file("[svndirpath]/entries"))) - var/list/filelist = file2list("[svndirpath]/entries") - var/s_archive = "" //Stores the previous line so the revision owner can be assigned. - - //This thing doesn't count blank lines, so doing filelist[4] isn't working. - for(var/s in filelist) - if(!commiter) - if(s == "has-props")//The line before this is the committer. - commiter = s_archive - if(!revision) - var/n = text2num(s) - if(isnum(n)) - if(n > 5000 && n < 99999) //Do you think we'll still be up and running at r100000? :) ~Errorage - revision = s - if(revision && commiter) - break - s_archive = s - if(!revision) - abort() - log_misc("Revision info loaded succesfully") - return - return abort() - - proc/getRevisionText() - var/output - if(revhref) - output = {"[revision]"} - else - output = revision - return output - - proc/showInfo() - return {" - - - -

Server Revision: [getRevisionText()]
- Author: [commiter]

- - "} - -client/verb/showrevinfo() - set category = "OOC" - set name = "Show Server Revision" - var/output = "Sorry, the revision info is unavailable." - output = file2text("/home/bay12/live/data/gitcommit") - output += "Current Infomational Settings:
" - output += "Protect Authority Roles From Traitor: [config.protect_roles_from_antagonist]
" - usr << browse(output,"window=revdata"); - return diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 14c8b67f2b..45a4ca2ef5 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -111,8 +111,6 @@ Implants; feedback_set_details("round_start","[time2text(world.realtime)]") if(ticker && ticker.mode) feedback_set_details("game_mode","[ticker.mode]") - if(revdata) - feedback_set_details("revision","[revdata.revision]") feedback_set_details("server_ip","[world.internet_address]:[world.port]") return 1 diff --git a/code/world.dm b/code/world.dm index b3fe9940a8..b74a1abccd 100644 --- a/code/world.dm +++ b/code/world.dm @@ -71,7 +71,7 @@ var/world_topic_spam_protect_time = world.timeofday /world/Topic(T, addr, master, key) diary << "TOPIC: \"[T]\", from:[addr], master:[master], key:[key][log_end]" - + if (T == "ping") var/x = 1 for (var/client/C) @@ -108,7 +108,6 @@ var/world_topic_spam_protect_time = world.timeofday n++ s["players"] = n - if(revdata) s["revision"] = revdata.revision s["admins"] = admins return list2params(s) @@ -127,7 +126,7 @@ var/world_topic_spam_protect_time = world.timeofday var/input[] = params2list(T) if(input["key"] != config.comms_password) if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50) - + spawn(50) world_topic_spam_protect_time = world.time return "Bad Key (Throttled)" @@ -136,9 +135,9 @@ var/world_topic_spam_protect_time = world.timeofday world_topic_spam_protect_ip = addr return "Bad Key" - + var/client/C - + for(var/client/K in clients) if(K.ckey == input["adminmsg"]) C = K @@ -155,7 +154,7 @@ var/world_topic_spam_protect_time = world.timeofday C << 'sound/effects/adminhelp.ogg' C << message - + for(var/client/A in admins) if(A != C) A << amessage @@ -182,9 +181,9 @@ var/world_topic_spam_protect_time = world.timeofday return "Bad Key" return show_player_info_irc(input["notes"]) - - + + /world/Reboot(var/reason) @@ -271,7 +270,7 @@ var/world_topic_spam_protect_time = world.timeofday var/title = "Moderator" if(config.mods_are_mentors) title = "Mentor" var/rights = admin_ranks[title] - + var/ckey = copytext(line, 1, length(line)+1) var/datum/admins/D = new /datum/admins(title, rights, ckey) D.associate(directory[ckey])