Player polls"
@@ -84,7 +84,7 @@
establish_db_connection()
if(dbcon.IsConnected())
- var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid]")
+ var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM ss13_poll_question WHERE id = [pollid]")
select_query.Execute()
var/pollstarttime = ""
@@ -109,7 +109,7 @@
switch(polltype)
//Polls that have enumerated options
if("OPTION")
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM ss13_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
var/voted = 0
@@ -121,7 +121,7 @@
var/list/datum/polloption/options = list()
- var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
+ var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM ss13_poll_option WHERE pollid = [pollid]")
options_query.Execute()
while(options_query.NextRow())
var/datum/polloption/PO = new()
@@ -162,7 +162,7 @@
//Polls with a text input
if("TEXT")
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT replytext FROM ss13_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
var/voted = 0
@@ -204,7 +204,7 @@
//Polls with a text input
if("NUMVAL")
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM erro_poll_option o, erro_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT o.text, v.rating FROM ss13_poll_option o, ss13_poll_vote v WHERE o.pollid = [pollid] AND v.ckey = '[usr.ckey]' AND o.id = v.optionid")
voted_query.Execute()
var/output = "
Player poll"
@@ -230,7 +230,7 @@
var/minid = 999999
var/maxid = 0
- var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM erro_poll_option WHERE pollid = [pollid]")
+ var/DBQuery/option_query = dbcon.NewQuery("SELECT id, text, minval, maxval, descmin, descmid, descmax FROM ss13_poll_option WHERE pollid = [pollid]")
option_query.Execute()
while(option_query.NextRow())
var/optionid = text2num(option_query.item[1])
@@ -273,7 +273,7 @@
src << browse(output,"window=playerpoll;size=500x500")
if("MULTICHOICE")
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT optionid FROM ss13_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
var/list/votedfor = list()
@@ -286,7 +286,7 @@
var/maxoptionid = 0
var/minoptionid = 0
- var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM erro_poll_option WHERE pollid = [pollid]")
+ var/DBQuery/options_query = dbcon.NewQuery("SELECT id, text FROM ss13_poll_option WHERE pollid = [pollid]")
options_query.Execute()
while(options_query.NextRow())
var/datum/polloption/PO = new()
@@ -345,7 +345,7 @@
establish_db_connection()
if(dbcon.IsConnected())
- var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
+ var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype, multiplechoiceoptions FROM ss13_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
select_query.Execute()
var/validpoll = 0
@@ -363,7 +363,7 @@
usr << "\red Poll is not valid."
return
- var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
+ var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM ss13_poll_option WHERE id = [optionid] AND pollid = [pollid]")
select_query2.Execute()
var/validoption = 0
@@ -378,7 +378,7 @@
var/alreadyvoted = 0
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM ss13_poll_vote WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -399,7 +399,7 @@
adminrank = usr.client.holder.rank
- var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
+ var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]')")
insert_query.Execute()
usr << "\blue Vote successful."
@@ -415,7 +415,7 @@
establish_db_connection()
if(dbcon.IsConnected())
- var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
+ var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM ss13_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
select_query.Execute()
var/validpoll = 0
@@ -432,7 +432,7 @@
var/alreadyvoted = 0
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM ss13_poll_textreply WHERE pollid = [pollid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -457,7 +457,7 @@
usr << "The text you entered was blank, contained illegal characters or was too long. Please correct the text and submit again."
return
- var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_textreply (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
+ var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_poll_textreply (id ,datetime ,pollid ,ckey ,ip ,replytext ,adminrank) VALUES (null, Now(), [pollid], '[usr.ckey]', '[usr.client.address]', '[replytext]', '[adminrank]')")
insert_query.Execute()
usr << "\blue Feedback logging successful."
@@ -473,7 +473,7 @@
establish_db_connection()
if(dbcon.IsConnected())
- var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM erro_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
+ var/DBQuery/select_query = dbcon.NewQuery("SELECT starttime, endtime, question, polltype FROM ss13_poll_question WHERE id = [pollid] AND Now() BETWEEN starttime AND endtime")
select_query.Execute()
var/validpoll = 0
@@ -488,7 +488,7 @@
usr << "\red Poll is not valid."
return
- var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM erro_poll_option WHERE id = [optionid] AND pollid = [pollid]")
+ var/DBQuery/select_query2 = dbcon.NewQuery("SELECT id FROM ss13_poll_option WHERE id = [optionid] AND pollid = [pollid]")
select_query2.Execute()
var/validoption = 0
@@ -503,7 +503,7 @@
var/alreadyvoted = 0
- var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM erro_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
+ var/DBQuery/voted_query = dbcon.NewQuery("SELECT id FROM ss13_poll_vote WHERE optionid = [optionid] AND ckey = '[usr.ckey]'")
voted_query.Execute()
while(voted_query.NextRow())
@@ -519,7 +519,7 @@
adminrank = usr.client.holder.rank
- var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO erro_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
+ var/DBQuery/insert_query = dbcon.NewQuery("INSERT INTO ss13_poll_vote (id ,datetime ,pollid ,optionid ,ckey ,ip ,adminrank, rating) VALUES (null, Now(), [pollid], [optionid], '[usr.ckey]', '[usr.client.address]', '[adminrank]', [(isnull(rating)) ? "null" : rating])")
insert_query.Execute()
usr << "\blue Vote successful."
diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm
index 2d7f723e..4b710124 100644
--- a/code/modules/research/message_server.dm
+++ b/code/modules/research/message_server.dm
@@ -301,7 +301,7 @@ var/obj/machinery/blackbox_recorder/blackbox
if(!dbcon.IsConnected()) return
var/round_id
- var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM erro_feedback")
+ var/DBQuery/query = dbcon.NewQuery("SELECT MAX(round_id) AS round_id FROM ss13_feedback")
query.Execute()
while(query.NextRow())
round_id = query.item[1]
@@ -311,7 +311,7 @@ var/obj/machinery/blackbox_recorder/blackbox
round_id++
for(var/datum/feedback_variable/FV in feedback)
- var/sql = "INSERT INTO erro_feedback VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
+ var/sql = "INSERT INTO ss13_feedback VALUES (null, Now(), [round_id], \"[FV.get_variable()]\", [FV.get_value()], \"[FV.get_details()]\")"
var/DBQuery/query_insert = dbcon.NewQuery(sql)
query_insert.Execute()