From aefa0cdee4f27a9a98532381083c604141318db5 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:13:43 +1000 Subject: [PATCH 1/7] polls now only sent to db when done being made --- code/modules/admin/create_poll.dm | 114 +++++++++++------------------- 1 file changed, 41 insertions(+), 73 deletions(-) diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index 92abf6d46d7..dcd53ef1732 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -3,31 +3,9 @@ set category = "Special Verbs" if(!check_rights(R_PERMISSIONS)) return - if(!SSdbcore.IsConnected()) + if(!SSdbcore.Connected()) to_chat(src, "Failed to establish database connection.") return - var/returned = create_poll_function() - if(returned) - var/datum/DBQuery/query_check_option = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_option")] WHERE pollid = [returned]") - if(!query_check_option.warn_execute()) - return - if(query_check_option.NextRow()) - var/datum/DBQuery/query_log_get = SSdbcore.NewQuery("SELECT polltype, question, adminonly FROM [format_table_name("poll_question")] WHERE id = [returned]") - if(!query_log_get.warn_execute()) - return - if(query_log_get.NextRow()) - var/polltype = query_log_get.item[1] - var/question = query_log_get.item[2] - var/adminonly = text2num(query_log_get.item[3]) - log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]") - message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]
Question: [question]") - else - to_chat(src, "Poll question created without any options, poll will be deleted.") - var/datum/DBQuery/query_del_poll = SSdbcore.NewQuery("DELETE FROM [format_table_name("poll_question")] WHERE id = [returned]") - if(!query_del_poll.warn_execute()) - return - -/client/proc/create_poll_function() var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")|null var/choice_amount = 0 switch(polltype) @@ -40,7 +18,9 @@ if("Multiple Choice") polltype = POLLTYPE_MULTI choice_amount = input("How many choices should be allowed?","Select choice amount") as num|null - if(!choice_amount) + if(choice_amount == 0) + to_chat(src, "Multiple choice poll must have at least one choice allowed.") + else if (choice_amount == null) return if ("Instant Runoff Voting") polltype = POLLTYPE_IRV @@ -51,22 +31,15 @@ if(!endtime) return endtime = sanitizeSQL(endtime) - var/datum/DBQuery/query_validate_time = SSdbcore.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T')") + var/datum/DBQuery/query_validate_time = SSdbcore.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T') < NOW()") if(!query_validate_time.warn_execute()) return if(query_validate_time.NextRow()) + var/checktime = text2num(query_validate_time.item[1]) + if(!checktime) + to_chat(src, "Datetime entered is improperly formatted or not later than current server time.") + return endtime = query_validate_time.item[1] - if(!endtime) - to_chat(src, "Datetime entered is invalid.") - return - var/datum/DBQuery/query_time_later = SSdbcore.NewQuery("SELECT TIMESTAMP('[endtime]') < NOW()") - if(!query_time_later.warn_execute()) - return - if(query_time_later.NextRow()) - var/checklate = text2num(query_time_later.item[1]) - if(checklate) - to_chat(src, "Datetime entered is not later than current server time.") - return var/adminonly switch(alert("Admin only poll?",,"Yes","No","Cancel")) if("Yes") @@ -88,34 +61,13 @@ if(!question) return question = sanitizeSQL(question) - var/datum/DBQuery/query_polladd_question = SSdbcore.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')") - if(!query_polladd_question.warn_execute()) - return - if(polltype == POLLTYPE_TEXT) - log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]") - message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]
Question: [question]") - return - var/pollid = 0 - var/datum/DBQuery/query_get_id = SSdbcore.NewQuery("SELECT id FROM [format_table_name("poll_question")] WHERE question = '[question]' AND starttime = '[starttime]' AND endtime = '[endtime]' AND createdby_ckey = '[sql_ckey]' AND createdby_ip = INET_ATON('[address]')") - if(!query_get_id.warn_execute()) - return - if(query_get_id.NextRow()) - pollid = query_get_id.item[1] + var/list/sql_option_list = list() var/add_option = 1 while(add_option) - var/option = input("Write your option","Option") as message|null + var/option = input("Write your option","Option") option as message|null if(!option) - return pollid + return option = sanitizeSQL(option) - var/percentagecalc = 1 - if (polltype != POLLTYPE_IRV) - switch(alert("Calculate option results as percentage?",,"Yes","No","Cancel")) - if("Yes") - percentagecalc = 1 - if("No") - percentagecalc = 0 - else - return pollid var/minval = 0 var/maxval = 0 var/descmin = "" @@ -123,32 +75,34 @@ var/descmax = "" if(polltype == POLLTYPE_RATING) minval = input("Set minimum rating value.","Minimum rating") as num|null - if(!minval) - return pollid + if(minval) + minval = sanitizeSQL(minval) + else if(minval == null) + return maxval = input("Set maximum rating value.","Maximum rating") as num|null - if(!maxval) - return pollid + if(maxval) + maxval = sanitizeSQL(maxval) if(minval >= maxval) - to_chat(src, "Minimum rating value can't be more than maximum rating value") - return pollid + to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value") + continue + else if(maxval == null) + return descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null if(descmin) descmin = sanitizeSQL(descmin) else if(descmin == null) - return pollid + return descmid = input("Optional: Set description for median rating","Median rating description") as message|null if(descmid) descmid = sanitizeSQL(descmid) else if(descmid == null) - return pollid + return descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null if(descmax) descmax = sanitizeSQL(descmax) else if(descmax == null) - return pollid - var/datum/DBQuery/query_polladd_option = SSdbcore.NewQuery("INSERT INTO [format_table_name("poll_option")] (pollid, text, percentagecalc, minval, maxval, descmin, descmid, descmax) VALUES ('[pollid]', '[option]', '[percentagecalc]', '[minval]', '[maxval]', '[descmin]', '[descmid]', '[descmax]')") - if(!query_polladd_option.warn_execute()) - return pollid + return + sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'")) switch(alert(" ",,"Add option","Finish", "Cancel")) if("Add option") add_option = 1 @@ -156,4 +110,18 @@ add_option = 0 else return 0 - return pollid \ No newline at end of file + var/datum/DBQuery/query_polladd_question = SSdbcore.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')") + if(!query_polladd_question.warn_execute()) + return + if(polltype != POLLTYPE_TEXT) + var/pollid = 0 + var/datum/DBQuery/query_get_id = SSdbcore.NewQuery("SELECT LAST_INSERT_ID()") + if(!query_get_id.warn_execute()) + return + if(query_get_id.NextRow()) + pollid = query_get_id.item[1] + for(var/i in sql_option_list) + sql_option_list[i] |= list("pollid" = "'[pollid]'") + SSdbcore.MassInsert(format_table_name("poll_option"), sql_option_list, warn = 1) + log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]") + message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]
Question: [question]") From 90ad0905d230cf9c5dac1c3afdbf832867217828 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:14:42 +1000 Subject: [PATCH 2/7] removes percentagecalc column --- SQL/tgstation_schema.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/SQL/tgstation_schema.sql b/SQL/tgstation_schema.sql index ace8807c960..28c1e98a546 100644 --- a/SQL/tgstation_schema.sql +++ b/SQL/tgstation_schema.sql @@ -286,7 +286,6 @@ CREATE TABLE `poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pollid` int(11) NOT NULL, `text` varchar(255) NOT NULL, - `percentagecalc` tinyint(1) NOT NULL DEFAULT '1', `minval` int(3) DEFAULT NULL, `maxval` int(3) DEFAULT NULL, `descmin` varchar(32) DEFAULT NULL, From 478ca26d5442defa9d036f4725892ad3f16d7751 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:15:16 +1000 Subject: [PATCH 3/7] removes percentagecalc column --- SQL/tgstation_schema_prefixed.sql | 1 - 1 file changed, 1 deletion(-) diff --git a/SQL/tgstation_schema_prefixed.sql b/SQL/tgstation_schema_prefixed.sql index 1451cadfadf..9c35c50e090 100644 --- a/SQL/tgstation_schema_prefixed.sql +++ b/SQL/tgstation_schema_prefixed.sql @@ -286,7 +286,6 @@ CREATE TABLE `SS13_poll_option` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pollid` int(11) NOT NULL, `text` varchar(255) NOT NULL, - `percentagecalc` tinyint(1) NOT NULL DEFAULT '1', `minval` int(3) DEFAULT NULL, `maxval` int(3) DEFAULT NULL, `descmin` varchar(32) DEFAULT NULL, From a69bb7f6452a2d4bab9c1ce93ff00c5e7aa5ec9d Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:19:07 +1000 Subject: [PATCH 4/7] query for removing percentagecalc --- SQL/database_changelog.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 0c36eb059f8..9021aee531b 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -1,3 +1,13 @@ +22 June 2017, by Jordie0608 + +Modified table 'poll_option', removing the column 'percentagecalc'. + +ALTER TABLE `feedback`.`poll_option` DROP COLUMN `percentagecalc` + +Remember to add a prefix to the table name if you use them. + +---------------------------------------------------- + 30 May 2017, by MrStonedOne Z levels changed, this query allows you to convert old ss13 death records: From d7bb5c626c7679d585e112c7a3e5d16dc27cb098 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:21:19 +1000 Subject: [PATCH 5/7] conflict fix --- SQL/database_changelog.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/SQL/database_changelog.txt b/SQL/database_changelog.txt index 9021aee531b..43765681eea 100644 --- a/SQL/database_changelog.txt +++ b/SQL/database_changelog.txt @@ -8,6 +8,22 @@ Remember to add a prefix to the table name if you use them. ---------------------------------------------------- +8 June 2017, by Jordie0608 + +Modified table 'death', adding column 'round_id', removing column 'gender' and replacing column 'coord' with the columns 'x_coord', 'y_coord' and 'z_coord'. + +START TRANSACTION; +ALTER TABLE `feedback`.`death` DROP COLUMN `gender`, ADD COLUMN `x_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `coord`, ADD COLUMN `y_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `x_coord`, ADD COLUMN `z_coord` SMALLINT(5) UNSIGNED NOT NULL AFTER `y_coord`, ADD COLUMN `round_id` INT(11) NOT NULL AFTER `server_port`; +SET SQL_SAFE_UPDATES = 0; +UPDATE `feedback`.`death` SET `x_coord` = SUBSTRING_INDEX(`coord`, ',', 1), `y_coord` = SUBSTRING_INDEX(SUBSTRING_INDEX(`coord`, ',', 2), ',', -1), `z_coord` = SUBSTRING_INDEX(`coord`, ',', -1); +SET SQL_SAFE_UPDATES = 1; +ALTER TABLE `feedback`.`death` DROP COLUMN `coord`; +COMMIT; + +Remember to add a prefix to the table name if you use them. + +--------------------------------------------------- + 30 May 2017, by MrStonedOne Z levels changed, this query allows you to convert old ss13 death records: @@ -33,11 +49,13 @@ Once created this table is populated with rows from the `feedback` table. START TRANSACTION; CREATE TABLE `feedback`.`round` (`id` INT(11) NOT NULL AUTO_INCREMENT, `start_datetime` DATETIME NOT NULL, `end_datetime` DATETIME NULL, `server_ip` INT(10) UNSIGNED NOT NULL, `server_port` SMALLINT(5) UNSIGNED NOT NULL, `commit_hash` CHAR(40) NULL, `game_mode` VARCHAR(32) NULL, `game_mode_result` VARCHAR(64) NULL, `end_state` VARCHAR(64) NULL, `shuttle_name` VARCHAR(64) NULL, `map_name` VARCHAR(32) NULL, `station_name` VARCHAR(80) NULL, PRIMARY KEY (`id`)); +ALTER TABLE `feedback`.`feedback` ADD INDEX `tmp` (`round_id` ASC, `var_name` ASC); INSERT INTO `feedback`.`round` (`id`, `start_datetime`, `end_datetime`, `server_ip`, `server_port`, `commit_hash`, `game_mode`, `game_mode_result`, `end_state`, `shuttle_name`, `map_name`, `station_name`) SELECT DISTINCT ri.round_id, IFNULL(STR_TO_DATE(st.details,'%a %b %e %H:%i:%s %Y'), TIMESTAMP(0)), STR_TO_DATE(et.details,'%a %b %e %H:%i:%s %Y'), IFNULL(INET_ATON(SUBSTRING_INDEX(IF(si.details = '', '0', IF(SUBSTRING_INDEX(si.details, ':', 1) LIKE '%_._%', si.details, '0')), ':', 1)), INET_ATON(0)), IFNULL(IF(si.details LIKE '%:_%', CAST(SUBSTRING_INDEX(si.details, ':', -1) AS UNSIGNED), '0'), '0'), ch.details, gm.details, mr.details, IFNULL(es.details, ep.details), ss.details, mn.details, sn.details FROM `feedback`.`feedback`AS ri LEFT JOIN `feedback`.`feedback` AS st ON ri.round_id = st.round_id AND st.var_name = "round_start" LEFT JOIN `feedback`.`feedback` AS et ON ri.round_id = et.round_id AND et.var_name = "round_end" LEFT JOIN `feedback`.`feedback` AS si ON ri.round_id = si.round_id AND si.var_name = "server_ip" LEFT JOIN `feedback`.`feedback` AS ch ON ri.round_id = ch.round_id AND ch.var_name = "revision" LEFT JOIN `feedback`.`feedback` AS gm ON ri.round_id = gm.round_id AND gm.var_name = "game_mode" LEFT JOIN `feedback`.`feedback` AS mr ON ri.round_id = mr.round_id AND mr.var_name = "round_end_result" LEFT JOIN `feedback`.`feedback` AS es ON ri.round_id = es.round_id AND es.var_name = "end_state" LEFT JOIN `feedback`.`feedback` AS ep ON ri.round_id = ep.round_id AND ep.var_name = "end_proper" LEFT JOIN `feedback`.`feedback` AS ss ON ri.round_id = ss.round_id AND ss.var_name = "emergency_shuttle" LEFT JOIN `feedback`.`feedback` AS mn ON ri.round_id = mn.round_id AND mn.var_name = "map_name" LEFT JOIN `feedback`.`feedback` AS sn ON ri.round_id = sn.round_id AND sn.var_name = "station_renames"; +ALTER TABLE `feedback`.`feedback` DROP INDEX `tmp`; COMMIT; It's not necessary to delete the rows from the `feedback` table but henceforth these datapoints will be in the `round` table. From 07b125cb3506479c3de4036fd84bdfe054948e95 Mon Sep 17 00:00:00 2001 From: Jordie Date: Thu, 22 Jun 2017 12:27:39 +1000 Subject: [PATCH 6/7] no options for text reply polls --- code/modules/admin/create_poll.dm | 97 ++++++++++++++++--------------- 1 file changed, 49 insertions(+), 48 deletions(-) diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index dcd53ef1732..d5534206a8b 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -61,55 +61,56 @@ if(!question) return question = sanitizeSQL(question) - var/list/sql_option_list = list() - var/add_option = 1 - while(add_option) - var/option = input("Write your option","Option") option as message|null - if(!option) - return - option = sanitizeSQL(option) - var/minval = 0 - var/maxval = 0 - var/descmin = "" - var/descmid = "" - var/descmax = "" - if(polltype == POLLTYPE_RATING) - minval = input("Set minimum rating value.","Minimum rating") as num|null - if(minval) - minval = sanitizeSQL(minval) - else if(minval == null) + if(polltype != POLLTYPE_TEXT) + var/list/sql_option_list = list() + var/add_option = 1 + while(add_option) + var/option = input("Write your option","Option") option as message|null + if(!option) return - maxval = input("Set maximum rating value.","Maximum rating") as num|null - if(maxval) - maxval = sanitizeSQL(maxval) - if(minval >= maxval) - to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value") - continue - else if(maxval == null) - return - descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null - if(descmin) - descmin = sanitizeSQL(descmin) - else if(descmin == null) - return - descmid = input("Optional: Set description for median rating","Median rating description") as message|null - if(descmid) - descmid = sanitizeSQL(descmid) - else if(descmid == null) - return - descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null - if(descmax) - descmax = sanitizeSQL(descmax) - else if(descmax == null) - return - sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'")) - switch(alert(" ",,"Add option","Finish", "Cancel")) - if("Add option") - add_option = 1 - if("Finish") - add_option = 0 - else - return 0 + option = sanitizeSQL(option) + var/minval = 0 + var/maxval = 0 + var/descmin = "" + var/descmid = "" + var/descmax = "" + if(polltype == POLLTYPE_RATING) + minval = input("Set minimum rating value.","Minimum rating") as num|null + if(minval) + minval = sanitizeSQL(minval) + else if(minval == null) + return + maxval = input("Set maximum rating value.","Maximum rating") as num|null + if(maxval) + maxval = sanitizeSQL(maxval) + if(minval >= maxval) + to_chat(src, "Maximum rating value can't be less than or equal to minimum rating value") + continue + else if(maxval == null) + return + descmin = input("Optional: Set description for minimum rating","Minimum rating description") as message|null + if(descmin) + descmin = sanitizeSQL(descmin) + else if(descmin == null) + return + descmid = input("Optional: Set description for median rating","Median rating description") as message|null + if(descmid) + descmid = sanitizeSQL(descmid) + else if(descmid == null) + return + descmax = input("Optional: Set description for maximum rating","Maximum rating description") as message|null + if(descmax) + descmax = sanitizeSQL(descmax) + else if(descmax == null) + return + sql_option_list += list(list("text" = "'[option]'", "minval" = "'[minval]'", "maxval" = "'[maxval]'", "descmin" = "'[descmin]'", "descmid" = "'[descmid]'", "descmax" = "'[descmax]'")) + switch(alert(" ",,"Add option","Finish", "Cancel")) + if("Add option") + add_option = 1 + if("Finish") + add_option = 0 + else + return 0 var/datum/DBQuery/query_polladd_question = SSdbcore.NewQuery("INSERT INTO [format_table_name("poll_question")] (polltype, starttime, endtime, question, adminonly, multiplechoiceoptions, createdby_ckey, createdby_ip, dontshow) VALUES ('[polltype]', '[starttime]', '[endtime]', '[question]', '[adminonly]', '[choice_amount]', '[sql_ckey]', INET_ATON('[address]'), '[dontshow]')") if(!query_polladd_question.warn_execute()) return From 9c0eff8d5e7f7096f79875ec5cf176e23a2fe113 Mon Sep 17 00:00:00 2001 From: Jordie0608 Date: Thu, 22 Jun 2017 22:04:05 +1000 Subject: [PATCH 7/7] makes it all work --- code/modules/admin/create_poll.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/admin/create_poll.dm b/code/modules/admin/create_poll.dm index d5534206a8b..61efa9514ed 100644 --- a/code/modules/admin/create_poll.dm +++ b/code/modules/admin/create_poll.dm @@ -3,7 +3,7 @@ set category = "Special Verbs" if(!check_rights(R_PERMISSIONS)) return - if(!SSdbcore.Connected()) + if(!SSdbcore.Connect()) to_chat(src, "Failed to establish database connection.") return var/polltype = input("Choose poll type.","Poll Type") in list("Single Option","Text Reply","Rating","Multiple Choice", "Instant Runoff Voting")|null @@ -31,7 +31,7 @@ if(!endtime) return endtime = sanitizeSQL(endtime) - var/datum/DBQuery/query_validate_time = SSdbcore.NewQuery("SELECT STR_TO_DATE('[endtime]','%Y-%c-%d %T') < NOW()") + var/datum/DBQuery/query_validate_time = SSdbcore.NewQuery("SELECT IF(STR_TO_DATE('[endtime]','%Y-%c-%d %T') > NOW(), STR_TO_DATE('[endtime]','%Y-%c-%d %T'), 0)") if(!query_validate_time.warn_execute()) return if(query_validate_time.NextRow()) @@ -61,11 +61,11 @@ if(!question) return question = sanitizeSQL(question) + var/list/sql_option_list = list() if(polltype != POLLTYPE_TEXT) - var/list/sql_option_list = list() var/add_option = 1 while(add_option) - var/option = input("Write your option","Option") option as message|null + var/option = input("Write your option","Option") as message|null if(!option) return option = sanitizeSQL(option) @@ -121,8 +121,8 @@ return if(query_get_id.NextRow()) pollid = query_get_id.item[1] - for(var/i in sql_option_list) - sql_option_list[i] |= list("pollid" = "'[pollid]'") + for(var/list/i in sql_option_list) + i |= list("pollid" = "'[pollid]'") SSdbcore.MassInsert(format_table_name("poll_option"), sql_option_list, warn = 1) log_admin("[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]") message_admins("[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]
Question: [question]")