Merge pull request #4546 from CrAzYPiLoT-SS13/changelogtweaks

Changelog notification tweak
This commit is contained in:
TheDZD
2016-06-03 12:36:51 -04:00
4 changed files with 5 additions and 8 deletions
+2 -1
View File
@@ -316,8 +316,9 @@
send_resources()
if(prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. -CP
if(!setup_database_connection())
return // if we have db problems, don't show anything
winset(src, "rpane.changelog", "background-color=#f4aa94;font-style=bold")
prefs.SetChangelog(src,changelog_hash)
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
if(!void)
+2
View File
@@ -456,10 +456,12 @@
/datum/preferences/proc/SetChangelog(client/C,hash)
lastchangelog=hash
winset(C, "rpane.changelog", "background-color=none;font-style=")
var/DBQuery/query = dbcon.NewQuery("UPDATE [format_table_name("player")] SET lastchangelog='[lastchangelog]' WHERE ckey='[C.ckey]'")
if(!query.Execute())
var/err = query.ErrorMsg()
log_game("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
message_admins("SQL ERROR during lastchangelog updating. Error : \[[err]\]\n")
to_chat(C, "Couldn't update your last seen changelog, please try again later.")
return
return 1
-4
View File
@@ -34,10 +34,6 @@
verbs += /client/proc/readmin
spawn(40)
if(client)
if(client.prefs.lastchangelog != changelog_hash) //bolds the changelog button on the interface so we know there are updates. -CP
winset(client, "rpane.changelog", "background-color=#f4aa94;font-style=bold")
client.prefs.SetChangelog(client,changelog_hash)
to_chat(src, "<span class='info'>Changelog has changed since your last visit.</span>")
client.playtitlemusic()
if(config.player_overflow_cap && config.overflow_server_url) //Overflow rerouting, if set, forces players to be moved to a different server once a player cap is reached. Less rough than a pure kick.