summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-10-16 19:39:53 -0300
committerJesusaves <cpntb1@ymail.com>2018-10-16 19:39:53 -0300
commitdb783bdca57192a4c8b6ffc0aed509e00ce03d15 (patch)
treeac8e791ebe41e4aa17f545e88a0f2cfcda41a076 /npc
parent979164a8d796c27b1db34376fc380b3a851369f8 (diff)
downloadserverdata-db783bdca57192a4c8b6ffc0aed509e00ce03d15.tar.gz
serverdata-db783bdca57192a4c8b6ffc0aed509e00ce03d15.tar.bz2
serverdata-db783bdca57192a4c8b6ffc0aed509e00ce03d15.tar.xz
serverdata-db783bdca57192a4c8b6ffc0aed509e00ce03d15.zip
Update Discord table fields to be discord-bot compliant
Diffstat (limited to 'npc')
-rw-r--r--npc/003-3/malindou.txt4
-rw-r--r--npc/commands/discord.txt5
2 files changed, 5 insertions, 4 deletions
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 7f242e96a..a8789a065 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -130,10 +130,10 @@ OnInit:
// Current UPDATE value: Ter Out 16 17:17:20 -03 2018
// This is a hack because I'm too lazy to be bothered with standard SQL Upgrade system
if ($UPDATE < 1539721040) {
- query_sql("CREATE TABLE IF NOT EXISTS `discord` (`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',`discord_id` VARCHAR(255) NOT NULL DEFAULT '') ENGINE=MyISAM");
+ query_sql("CREATE TABLE IF NOT EXISTS `discord` (`account_id` INT(11) UNSIGNED NOT NULL DEFAULT '0',`discord_id` VARCHAR(255) NOT NULL DEFAULT '',`discord_name` VARCHAR(255) NOT NULL DEFAULT '',`verified` ENUM(0, 1) NOT NULL DEFAULT '0') ENGINE=MyISAM");
$UPDATE=1539721040;
debugmes "";
- debugmes "* SQL Upgrade (will not work on new installations)";
+ debugmes "* SQL Upgrade (no effect on new installations)";
debugmes "";
}
diff --git a/npc/commands/discord.txt b/npc/commands/discord.txt
index f854e23b0..2b6264519 100644
--- a/npc/commands/discord.txt
+++ b/npc/commands/discord.txt
@@ -20,7 +20,7 @@ OnCall:
close;
@discord=1;
- .@nb = query_sql("select `discord_id` from `discord` WHERE `account_id` == "+getcharid(3), .@discord$);
+ .@nb = query_sql("select `discord_name` from `discord` WHERE `account_id` == "+getcharid(3), .@discord$);
do
@@ -40,7 +40,8 @@ OnCall:
input .@discord$;
.@discord$=escape_sql(.@discord$);
mes "";
- query_sql("UPDATE `discord` SET `discord_id` = '"+.@discord$+"' WHERE `account_id` == "+getcharid(3));
+ query_sql("UPDATE `discord` SET `discord_name` = '"+.@discord$+"' WHERE `account_id` == "+getcharid(3));
+ query_sql("UPDATE `discord` SET `verified` = '0' WHERE `account_id` == "+getcharid(3));
break;
case 2:
query_sql("DELETE FROM `discord` WHERE `account_id` == "+getcharid(3));