Commit 91a7d099 authored by nanahira's avatar nanahira

unfinished

parent 5442fd83
...@@ -28,7 +28,8 @@ __decorate([ ...@@ -28,7 +28,8 @@ __decorate([
__metadata("design:type", String) __metadata("design:type", String)
], Ban.prototype, "name", void 0); ], Ban.prototype, "name", void 0);
Ban = __decorate([ Ban = __decorate([
typeorm_1.Entity() typeorm_1.Entity(),
typeorm_1.Unique(["ip", "name"])
], Ban); ], Ban);
exports.Ban = Ban; exports.Ban = Ban;
//# sourceMappingURL=Ban.js.map //# sourceMappingURL=Ban.js.map
\ No newline at end of file
import {Column, Entity, Index, PrimaryGeneratedColumn} from "typeorm"; import {Column, Entity, Index, PrimaryGeneratedColumn, Unique} from "typeorm";
@Entity() @Entity()
@Unique(["ip", "name"])
export class Ban { export class Ban {
@PrimaryGeneratedColumn({ unsigned: true, type: "bigint" }) @PrimaryGeneratedColumn({ unsigned: true, type: "bigint" })
id: number; id: number;
......
...@@ -7,4 +7,6 @@ export class User { ...@@ -7,4 +7,6 @@ export class User {
@Column("varchar", {length: 16, nullable: true}) @Column("varchar", {length: 16, nullable: true})
chatColor: string; chatColor: string;
} }
import {Column, Entity, Index, PrimaryGeneratedColumn, Unique} from "typeorm";
@Entity()
export class VipKey {
@PrimaryGeneratedColumn({unsigned: true, type: "bigint"})
id: number;
@Index({unique: true})
@Column("varchar", {length: 30})
key: string;
@Column("int", {unsigned: true})
type: number;
toJSON() {
return {key: this.key, type: this.type};
}
}
...@@ -972,6 +972,8 @@ CLIENT_get_authorize_key = global.CLIENT_get_authorize_key = (client) -> ...@@ -972,6 +972,8 @@ CLIENT_get_authorize_key = global.CLIENT_get_authorize_key = (client) ->
return client.name_vpass return client.name_vpass
else if settings.modules.mycard.enabled or settings.modules.tournament_mode.enabled or settings.modules.challonge.enabled or client.is_local else if settings.modules.mycard.enabled or settings.modules.tournament_mode.enabled or settings.modules.challonge.enabled or client.is_local
return client.name return client.name
else if client.vip
return client.name + "$" + client.vpass
else else
return client.ip + ":" + client.name return client.ip + ":" + client.name
...@@ -3373,7 +3375,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)-> ...@@ -3373,7 +3375,7 @@ ygopro.ctos_follow 'CHAT', true, (buffer, info, client, server, datas)->
ygopro.stoc_send_chat(client, "${chat_order_vip_help}") ygopro.stoc_send_chat(client, "${chat_order_vip_help}")
ygopro.stoc_send_chat(client, "${chat_order_vip_status}") ygopro.stoc_send_chat(client, "${chat_order_vip_status}")
ygopro.stoc_send_chat(client, "${chat_order_vip_buy}") ygopro.stoc_send_chat(client, "${chat_order_vip_buy}")
ygopro.stoc_send_chat(client, "${chat_order_vip_password}") # ygopro.stoc_send_chat(client, "${chat_order_vip_password}")
ygopro.stoc_send_chat(client, "${chat_order_vip_dialogues}") ygopro.stoc_send_chat(client, "${chat_order_vip_dialogues}")
ygopro.stoc_send_chat(client, "${chat_order_vip_words}") ygopro.stoc_send_chat(client, "${chat_order_vip_words}")
ygopro.stoc_send_chat(client, "${chat_order_vip_victory}") ygopro.stoc_send_chat(client, "${chat_order_vip_victory}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment