vjudge: add Provider.noComment

This commit is contained in:
undefined committed 2024-11-13 11:31:34 +08:00
1 parent c41f483d7b
commit d33c186571
2 files changed
+2 -1

No files matched your search

+1 -1
View File
@@ -55,7 +55,7 @@ class AccountService {
}
if (langConfig.validAs?.[this.account.type]) task.lang = langConfig.validAs[this.account.type];
const comment = langConfig.comment;
if (comment) {
if (comment && !this.Provider.noComment) {
const msg = `Hydro submission #${task.rid}@${new Date().getTime()}`;
if (typeof comment === 'string') task.code = `${comment} ${msg}\n${task.code}`;
else if (comment instanceof Array) task.code = `${comment[0]} ${msg} ${comment[1]}\n${task.code}`;
+1
View File
@@ -46,4 +46,5 @@ export interface IBasicProvider {
export interface BasicProvider {
new(account: RemoteAccount, save: (data: any) => Promise<void>): IBasicProvider;
Langs?: Record<string, Partial<LangConfig>>;
noComment?: boolean;
}