the Rainbow Purge
This commit is contained in:
parent
b640dc4e20
commit
fe288235c3
|
@ -19,6 +19,8 @@ hostname = "localhost:8080"
|
||||||
# if you're putting the server behind nginx or cloudflare,
|
# if you're putting the server behind nginx or cloudflare,
|
||||||
# keep this on to keep ips accurate
|
# keep this on to keep ips accurate
|
||||||
trust_proxy = true
|
trust_proxy = true
|
||||||
|
# 🤫
|
||||||
|
easter_eggs = false
|
||||||
|
|
||||||
[formatting]
|
[formatting]
|
||||||
# whether to format dates as relative or absolute
|
# whether to format dates as relative or absolute
|
||||||
|
|
|
@ -88,6 +88,10 @@ module CrystalGauntlet
|
||||||
@@template_endpoints
|
@@template_endpoints
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.is_funny
|
||||||
|
config_get("general.easter_eggs", false)
|
||||||
|
end
|
||||||
|
|
||||||
def severity_color(severity : Log::Severity) : Colorize::Object
|
def severity_color(severity : Log::Severity) : Colorize::Object
|
||||||
case severity
|
case severity
|
||||||
when .trace?
|
when .trace?
|
||||||
|
|
|
@ -26,8 +26,15 @@ CrystalGauntlet.endpoints["/getGJComments21.php"] = ->(context : HTTP::Server::C
|
||||||
end
|
end
|
||||||
|
|
||||||
user_rank = account_id ? Ranks.get_rank(account_id) : nil
|
user_rank = account_id ? Ranks.get_rank(account_id) : nil
|
||||||
LOG.debug { user_rank.not_nil!.name }
|
|
||||||
LOG.debug { user_rank.not_nil!.text_color }
|
text_color = ((user_rank ? user_rank.text_color : nil) || [0, 0, 0]).join(",")
|
||||||
|
badge = user_rank ? user_rank.badge : 0
|
||||||
|
if CrystalGauntlet.is_funny && Time.utc.hour == 5 && Time.utc.minute == 55
|
||||||
|
text_color = "#{rand(255)},#{rand(255)},#{rand(255)}"
|
||||||
|
if badge == 0
|
||||||
|
badge = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if Versions.parse(params["gameVersion"]? || "19") >= Versions::V2_1
|
if Versions.parse(params["gameVersion"]? || "19") >= Versions::V2_1
|
||||||
comments_str << [
|
comments_str << [
|
||||||
|
@ -41,8 +48,8 @@ CrystalGauntlet.endpoints["/getGJComments21.php"] = ->(context : HTTP::Server::C
|
||||||
8 => account_id,
|
8 => account_id,
|
||||||
9 => Time.parse(created_at, Format::TIME_FORMAT, Time::Location::UTC),
|
9 => Time.parse(created_at, Format::TIME_FORMAT, Time::Location::UTC),
|
||||||
10 => percent || 0,
|
10 => percent || 0,
|
||||||
11 => user_rank ? user_rank.badge : 0,
|
11 => badge,
|
||||||
12 => ((user_rank ? user_rank.text_color : nil) || [0, 0, 0]).join(","),
|
12 => text_color,
|
||||||
}),
|
}),
|
||||||
Format.fmt_comment({
|
Format.fmt_comment({
|
||||||
1 => username || "-",
|
1 => username || "-",
|
||||||
|
@ -65,8 +72,8 @@ CrystalGauntlet.endpoints["/getGJComments21.php"] = ->(context : HTTP::Server::C
|
||||||
8 => account_id,
|
8 => account_id,
|
||||||
9 => Time.parse(created_at, Format::TIME_FORMAT, Time::Location::UTC),
|
9 => Time.parse(created_at, Format::TIME_FORMAT, Time::Location::UTC),
|
||||||
10 => percent || 0,
|
10 => percent || 0,
|
||||||
11 => user_rank ? user_rank.badge : 0,
|
11 => badge,
|
||||||
12 => ((user_rank ? user_rank.text_color : nil) || [0, 0, 0]).join(","),
|
12 => text_color,
|
||||||
})
|
})
|
||||||
|
|
||||||
users_str << [user_id, username || "-", account_id || udid ].join(":")
|
users_str << [user_id, username || "-", account_id || udid ].join(":")
|
||||||
|
|
Loading…
Reference in New Issue