mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-07-30 14:36:19 +02:00
* Some basic work on connecting modules
This commit is contained in:
parent
810f001901
commit
d1b0663b5d
7 changed files with 109 additions and 17 deletions
39
mods/goodbye.js
Normal file
39
mods/goodbye.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
/* jslint node: true */
|
||||
'use strict';
|
||||
|
||||
var MenuModule = require('../core/menu_module.js').MenuModule;
|
||||
var ansi = require('../core/ansi_term.js');
|
||||
|
||||
exports.moduleInfo = {
|
||||
name : 'Goodbye',
|
||||
desc : 'Log off / Goodbye Module',
|
||||
author : 'NuSkooler',
|
||||
};
|
||||
|
||||
exports.getModule = GoodbyeModule;
|
||||
|
||||
function GoodbyeModule(menuConfig) {
|
||||
MenuModule.call(this, menuConfig);
|
||||
}
|
||||
|
||||
require('util').inherits(GoodbyeModule, MenuModule);
|
||||
|
||||
GoodbyeModule.prototype.enter = function(client) {
|
||||
GoodbyeModule.super_.prototype.enter.call(this, client);
|
||||
};
|
||||
|
||||
GoodbyeModule.prototype.beforeArt = function() {
|
||||
GoodbyeModule.super_.prototype.beforeArt.call(this);
|
||||
|
||||
this.client.term.write(ansi.resetScreen());
|
||||
};
|
||||
|
||||
GoodbyeModule.prototype.mciReady = function(mciMap) {
|
||||
GoodbyeModule.super_.prototype.mciReady.call(this, mciMap);
|
||||
};
|
||||
|
||||
GoodbyeModule.prototype.finishedLoading = function() {
|
||||
GoodbyeModule.super_.prototype.finishedLoading.call(this);
|
||||
|
||||
this.client.end();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue