mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 04:28:12 +01:00
Fixed runtime error with changeling gibbed by alium larva.
Added sanitize() to naming the buffers in DNA machine and to alien whispering. Added 0.5 sec timeout for BANG BANG. Added drinking glasses to the Dinnerware vending machine. Update from Nikie: Verb Reload Admins rereads admins.txt Parameter sql_enabled in config. Prevents spam when sql is not installed. NOTE FOR HOSTERS: it is currently ON in code (i.e. behavior is unchanged yet), you have to add SQL_ENABLED to your config.txt during next week. Thanks for your attention. Fixed "Delay" command. Messages for help intent are gender-aware now. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1463 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -1421,11 +1421,18 @@ var/showadminmessages = 1
|
||||
//add <th>IP:</th> to this if wanting to add back in IP checking
|
||||
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
|
||||
var/list/mobs = sortmobs()
|
||||
var/DBConnection/dbcon = new()
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(!dbcon.IsConnected())
|
||||
usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.<br>"
|
||||
var/show_karma = 0
|
||||
var/DBConnection/dbcon
|
||||
|
||||
if(config.sql_enabled) // SQL is enabled in config.txt
|
||||
dbcon = new() // Setting up connection
|
||||
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
|
||||
if(dbcon.IsConnected())
|
||||
show_karma = 1
|
||||
else
|
||||
usr << "\red Unable to connect to karma database. This error can occur if your host has failed to set up an SQL database or improperly configured its login credentials.<br>"
|
||||
|
||||
if(!show_karma)
|
||||
for(var/mob/M in mobs)
|
||||
if(M.ckey)
|
||||
dat += "<tr><td>[M.name]</td>"
|
||||
@@ -1448,7 +1455,10 @@ var/showadminmessages = 1
|
||||
<td align=center><A href='?src=\ref[usr];priv_msg=\ref[M]'>PM</A></td>
|
||||
<td align=center><A HREF='?src=\ref[src];traitor=\ref[M]'>[checktraitor(M) ? "<font color=red>" : "<font>"]Traitor?</font></A></td>
|
||||
"}
|
||||
dat += "<td><font color=red>NOT CONNECTED</font></td></tr>"
|
||||
if (config.sql_enabled)
|
||||
dat += "<td><font color=red>ERROR</font></td></tr>"
|
||||
else
|
||||
dat += "<td>disabled</td></tr>"
|
||||
|
||||
else
|
||||
|
||||
@@ -1893,7 +1903,7 @@ var/showadminmessages = 1
|
||||
set category = "Server"
|
||||
set desc="Delay the game start"
|
||||
set name="Delay"
|
||||
if (ticker)
|
||||
if (!ticker || ticker.current_state != GAME_STATE_PREGAME)
|
||||
return alert("Too late... The game has already started!", null, null, null, null, null)
|
||||
going = !( going )
|
||||
if (!( going ))
|
||||
|
||||
@@ -73,6 +73,7 @@
|
||||
src.verbs += /client/proc/air_report
|
||||
src.verbs += /client/proc/air_status
|
||||
src.verbs += /client/proc/radio_report
|
||||
src.verbs += /client/proc/reload_admins
|
||||
src.verbs += /client/proc/kill_air // -- TLE
|
||||
src.verbs += /client/proc/modifytemperature
|
||||
src.verbs += /client/proc/callproc
|
||||
@@ -211,6 +212,7 @@
|
||||
src.verbs += /client/proc/air_report
|
||||
src.verbs += /client/proc/air_status
|
||||
src.verbs += /client/proc/radio_report
|
||||
src.verbs += /client/proc/reload_admins
|
||||
//src.verbs += /client/proc/kill_air // -- TLE
|
||||
src.verbs += /client/proc/modifytemperature
|
||||
src.verbs += /client/proc/callproc
|
||||
|
||||
@@ -146,3 +146,32 @@
|
||||
output += " [device]<br>"
|
||||
|
||||
usr << browse(output,"window=radioreport")
|
||||
|
||||
reload_admins()
|
||||
set name = "Reload Admins"
|
||||
set category = "Debug"
|
||||
|
||||
if(!(usr.client.holder && usr.client.holder.level >= 6)) // protect and prevent
|
||||
usr << "\red Not a good cop"
|
||||
return
|
||||
|
||||
message_admins("[usr] manually reloaded admins.txt")
|
||||
usr << "You reload admins.txt"
|
||||
var/text = file2text("config/admins.txt")
|
||||
if (!text)
|
||||
diary << "Failed to reload config/admins.txt\n"
|
||||
else
|
||||
var/list/lines = dd_text2list(text, "\n")
|
||||
for(var/line in lines)
|
||||
if (!line)
|
||||
continue
|
||||
|
||||
if (copytext(line, 1, 2) == ";")
|
||||
continue
|
||||
|
||||
var/pos = findtext(line, " - ", 1, null)
|
||||
if (pos)
|
||||
var/m_key = copytext(line, 1, pos)
|
||||
var/a_lev = copytext(line, pos + 3, length(line) + 1)
|
||||
admins[m_key] = a_lev
|
||||
diary << ("ADMIN: [m_key] = [a_lev]")
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
return
|
||||
if (!( ismob(M) ))
|
||||
return
|
||||
var/t = input("Message:", text("Private message to [M.key]")) as text
|
||||
var/t = input("Message:", text("Private message to [M.key]")) as text|null
|
||||
if(src.holder.rank != "Game Admin" && src.holder.rank != "Game Master")
|
||||
t = strip_html(t,500)
|
||||
if (!( t ))
|
||||
@@ -376,7 +376,7 @@ TO DO: actually integrate random appearance and player preference save.
|
||||
if(!src.authenticated || !src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "")
|
||||
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
||||
if(!input)
|
||||
return
|
||||
for(var/mob/living/silicon/ai/M in world)
|
||||
@@ -436,7 +436,7 @@ TO DO: actually integrate random appearance and player preference save.
|
||||
if(!src.authenticated || !src.holder)
|
||||
src << "Only administrators may use this command."
|
||||
return
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "")
|
||||
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
||||
if(!input)
|
||||
return
|
||||
for (var/obj/machinery/computer/communications/C in machines)
|
||||
|
||||
Reference in New Issue
Block a user