mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fixed a couple issues and added columns to schema file.
This commit is contained in:
@@ -61,8 +61,10 @@ CREATE TABLE `erro_player` (
|
||||
`ip` varchar(18) NOT NULL,
|
||||
`computerid` varchar(32) NOT NULL,
|
||||
`lastadminrank` varchar(32) NOT NULL DEFAULT 'Player',
|
||||
`discord_id` varchar(64) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `ckey` (`ckey`)
|
||||
UNIQUE KEY `ckey` (`ckey`),
|
||||
KEY `discord_id` (`discord_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ;
|
||||
|
||||
CREATE TABLE `erro_poll_option` (
|
||||
@@ -123,5 +125,6 @@ CREATE TABLE `vr_player_hours` (
|
||||
`ckey` varchar(32) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
|
||||
`department` varchar(64) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL,
|
||||
`hours` double NOT NULL,
|
||||
`total_hours` double NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`ckey`,`department`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
@@ -75,7 +75,7 @@
|
||||
GLOB.pending_discord_registrations -= item
|
||||
continue
|
||||
if(L["ckey"] == ckey && L["id"] == their_id)
|
||||
GLOB.pending_discord_registrations -= item
|
||||
GLOB.pending_discord_registrations -= list(item)
|
||||
var/time = L["time"]
|
||||
if((world.realtime - time) > 10 MINUTES)
|
||||
to_chat(src, "<span class='warning'>Sorry, that link has expired. Please request another on Discord.</span>")
|
||||
@@ -98,6 +98,7 @@
|
||||
else
|
||||
to_chat(src, "<span class='warning'>There was an error registering your Discord ID in the database. Contact an administrator.</span>")
|
||||
log_and_message_admins("[ckey] failed to register their Discord ID. Their Discord snowflake ID is: [their_id]. Is the database connected?")
|
||||
return
|
||||
//VOREStation Add End
|
||||
|
||||
//Logs all hrefs
|
||||
|
||||
@@ -109,7 +109,7 @@ GLOBAL_LIST_EMPTY(pending_discord_registrations)
|
||||
// Okay. We found them, they're in the DB, and they have no discord ID set.
|
||||
var/message = "<span class='notice'>A request has been sent from Discord to validate your Byond username, by '[sender.friendly_name]' in '[sender.channel.friendly_name]'</span>\
|
||||
<br><span class='warning'>If you did not send this request, do not click the link below, and do notify an administrator in-game or on Discord ASAP.</span>\
|
||||
<br><a href='byond://?src=\ref[user];discord_reg=html_encode([sender.id])'>Click Here</a> if you authorized this registration attempt. This link is valid for 10 minutes."
|
||||
<br><a href='byond://?src=\ref[user];discord_reg=[html_encode(sender.id)]'>Click Here</a> if you authorized this registration attempt. This link is valid for 10 minutes."
|
||||
to_chat(user, message)
|
||||
|
||||
// To stifle href hacking
|
||||
|
||||
Reference in New Issue
Block a user