removes the getrev stuff because it's svn and old and I couldn't get tg's stuff to work :c
This commit is contained in:
Boop
2014-06-17 17:25:57 +01:00
parent 3dfc20eebe
commit d2e81da90c
4 changed files with 8 additions and 108 deletions

View File

@@ -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"

View File

@@ -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 = {"<a href="[revhref][revision]">[revision]</a>"}
else
output = revision
return output
proc/showInfo()
return {"<html>
<head>
</head>
<body>
<p><b>Server Revision:</b> [getRevisionText()]<br/>
<b>Author:</b> [commiter]</p>
</body>
<html>"}
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: <br>"
output += "Protect Authority Roles From Traitor: [config.protect_roles_from_antagonist]<br>"
usr << browse(output,"window=revdata");
return

View File

@@ -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

View File

@@ -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])