From 3a585cbb6052c33171b629aaae48a120a08104c9 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Sat, 23 Mar 2013 22:02:54 -0500 Subject: [PATCH] Create ban table in Channel.createTables --- channel.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/channel.js b/channel.js index 65ca5eaa..9ba12e70 100644 --- a/channel.js +++ b/channel.js @@ -140,6 +140,18 @@ Channel.prototype.createTables = function() { .replace(/\{\}/, this.name); results = db.querySync(query) || results; + // Create ban table + var query = "CREATE TABLE `chan_{}_bans` (\ + `ip` VARCHAR( 15 ) NOT NULL ,\ + `name` VARCHAR( 32 ) NOT NULL ,\ + `banner` VARCHAR( 32 ) NOT NULL ,\ + PRIMARY KEY (\ + `ip`\ + )\ + ) ENGINE = MYISAM" + .replace(/\{\}/, this.name); + results = db.querySync(query) || results; + // Insert into global channel table var query = 'INSERT INTO channels (`id`, `name`) VALUES (NULL, "{}")' .replace(/\{\}/, this.name);