mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 22:15:37 +00:00
Fix SQL syntax error
This commit is contained in:
1 parent
0a52817f1a
commit
17b169f330
1 file changed
+32
-5
+32
-5
@@ -299,10 +299,38 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.carbonChat.logger().info("Saving user data!");
|
this.carbonChat.logger().info("Saving user data!");
|
||||||
stm.executeUpdateQuery("INSERT INTO sc_users (uuid, channel, muted, shadowmuted, spyingwhispers, nickname, customchatcolor, whisperpingkey, whisperpingvolume " +
|
// TODO: Store in a nice format in a file, and load in?
|
||||||
"whisperpingpitch, channelpingkey, channelpingvolume, channelpingpitch) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) " +
|
stm.executeUpdateQuery("INSERT INTO" +
|
||||||
"ON DUPLICATE KEY UPDATE channel = ?, muted = ?, shadowmuted = ?, spyingwhispers = ?, nickname = ?, customchatcolor = ?, whisperpingkey = ?, whisperpingvolume = ?, " +
|
" sc_users (" +
|
||||||
"whisperpingpitch = ?, channelpingkey = ?, channelpingvolume = ?, channelpingpitch = ?",
|
" uuid," +
|
||||||
|
" channel," +
|
||||||
|
" muted," +
|
||||||
|
" shadowmuted," +
|
||||||
|
" spyingwhispers," +
|
||||||
|
" nickname," +
|
||||||
|
" customchatcolor," +
|
||||||
|
" whisperpingkey," +
|
||||||
|
" whisperpingvolume," +
|
||||||
|
" whisperpingpitch," +
|
||||||
|
" channelpingkey," +
|
||||||
|
" channelpingvolume," +
|
||||||
|
" channelpingpitch" +
|
||||||
|
" )" +
|
||||||
|
"VALUES" +
|
||||||
|
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ON DUPLICATE KEY" +
|
||||||
|
"UPDATE" +
|
||||||
|
" channel = ?," +
|
||||||
|
" muted = ?," +
|
||||||
|
" shadowmuted = ?," +
|
||||||
|
" spyingwhispers = ?," +
|
||||||
|
" nickname = ?," +
|
||||||
|
" customchatcolor = ?," +
|
||||||
|
" whisperpingkey = ?," +
|
||||||
|
" whisperpingvolume = ?," +
|
||||||
|
" whisperpingpitch = ?," +
|
||||||
|
" channelpingkey = ?," +
|
||||||
|
" channelpingvolume = ?," +
|
||||||
|
" channelpingpitch = ?",
|
||||||
user.uuid().toString(),
|
user.uuid().toString(),
|
||||||
selectedName, user.muted(), user.shadowMuted(), user.spyingWhispers(), user.nickname(), user.customChatColor(),
|
selectedName, user.muted(), user.shadowMuted(), user.spyingWhispers(), user.nickname(), user.customChatColor(),
|
||||||
whisperName, whisperVolume, whisperPitch, channelName, channelVolume, channelPitch,
|
whisperName, whisperVolume, whisperPitch, channelName, channelVolume, channelPitch,
|
||||||
@@ -336,7 +364,6 @@ public class MySQLUserService<T extends PlayerUser, C extends ConsoleUser> imple
|
|||||||
stm.executeUpdateQuery("INSERT INTO sc_ignored_users (uuid, user) VALUES (?, ?)",
|
stm.executeUpdateQuery("INSERT INTO sc_ignored_users (uuid, user) VALUES (?, ?)",
|
||||||
user.uuid().toString(), entry.toString());
|
user.uuid().toString(), entry.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user