Merge branch 'master' of ssh://numinibsd/git/base/enigma-bbs
This commit is contained in:
commit
a32f810c46
|
@ -97,6 +97,9 @@ function initializeDatabases(cb) {
|
|||
}
|
||||
|
||||
function createSystemTables() {
|
||||
|
||||
dbs.system.run('PRAGMA foreign_keys = ON;');
|
||||
|
||||
dbs.system.run(
|
||||
'CREATE TABLE IF NOT EXISTS system_property (' +
|
||||
' prop_name VARCHAR PRIMARY KEY NOT NULL,' +
|
||||
|
@ -120,6 +123,8 @@ function createSystemTables() {
|
|||
}
|
||||
|
||||
function createUserTables() {
|
||||
dbs.user.run('PRAGMA foreign_keys = ON;');
|
||||
|
||||
dbs.user.run(
|
||||
`CREATE TABLE IF NOT EXISTS user (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
@ -158,6 +163,9 @@ function createUserTables() {
|
|||
}
|
||||
|
||||
function createMessageBaseTables() {
|
||||
|
||||
dbs.message.run('PRAGMA foreign_keys = ON;');
|
||||
|
||||
dbs.message.run(
|
||||
`CREATE TABLE IF NOT EXISTS message (
|
||||
message_id INTEGER PRIMARY KEY,
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
var Config = require('./config.js').config;
|
||||
var Log = require('./logger.js').log;
|
||||
var getMessageAreaByTag = require('./message_area.js').getMessageAreaByTag;
|
||||
var clientConnections = require('./client_connections.js');
|
||||
var sysProp = require('./system_property.js');
|
||||
// ENiGMA½
|
||||
const Config = require('./config.js').config;
|
||||
const Log = require('./logger.js').log;
|
||||
const getMessageAreaByTag = require('./message_area.js').getMessageAreaByTag;
|
||||
const clientConnections = require('./client_connections.js');
|
||||
const sysProp = require('./system_property.js');
|
||||
|
||||
var packageJson = require('../package.json');
|
||||
var assert = require('assert');
|
||||
var os = require('os');
|
||||
var _ = require('lodash');
|
||||
var moment = require('moment');
|
||||
// deps
|
||||
const packageJson = require('../package.json');
|
||||
const os = require('os');
|
||||
const _ = require('lodash');
|
||||
const moment = require('moment');
|
||||
|
||||
exports.getPredefinedMCIValue = getPredefinedMCIValue;
|
||||
|
||||
|
@ -114,6 +115,11 @@ function getPredefinedMCIValue(client, code) {
|
|||
|
||||
TC : function totalCalls() { return sysProp.getSystemProperty('login_count').toString(); },
|
||||
|
||||
//
|
||||
// Special handling for XY
|
||||
//
|
||||
XY : function xyHack() { return; /* nothing */ },
|
||||
|
||||
}[code](); // :TODO: Just call toString() here and remove above - DRY
|
||||
|
||||
} catch(e) {
|
||||
|
|
Loading…
Reference in New Issue