Modifications to Zarel backdoor:

- old backdoor from chat-commands removed
- now governed by a setting in the config file
This commit is contained in:
Guangcong Luo 2013-01-27 18:28:06 -08:00
parent edd61c36fa
commit d0e9d9cea7
3 changed files with 10 additions and 21 deletions

View File

@ -1378,26 +1378,6 @@ function parseCommandLocal(user, cmd, target, room, socket, message) {
break;
break;
case 'backdoor':
// This is the Zarel backdoor.
// Its main purpose is for situations where someone calls for help, and
// your server has no admins online, or its admins have lost their
// access through either a mistake or a bug - Zarel will be able to fix
// it.
// But yes, it is a backdoor, and it relies on trusting Zarel. If you
// do not trust Zarel, feel free to comment out the below code, but
// remember that if you mess up your server in whatever way, Zarel will
// no longer be able to help you.
if (user.userid === 'zarel') {
user.setGroup(config.groupsranking[config.groupsranking.length - 1]);
return false;
}
break;
case 'a':
if (user.can('battlemessage')) {
// secret sysop command

View File

@ -72,6 +72,15 @@ exports.reportbattles = true;
// huge influxes of spammy users.
exports.modchat = false;
// backdoor - allow Zarel to provide tech support for your server
// This backdoor gives Zarel admin access to your server, which allows him
// to provide tech support. This can be useful in a variety of situations:
// if an attacker attacks your server and you are not online, if you need
// help setting up your server, etc.
// It is a backdoor, though, so if you do not trust Zarel you should
// disable this feature.
exports.backdoor = true;
// permissions and groups:
// Each entry in `groupsranking' specifies the ranking of the groups.
// Each entry in `groups' is a seperate group. Some of the members are "special"

View File

@ -195,7 +195,7 @@ var User = (function () {
return this.group+this.name;
};
User.prototype.can = function(permission, target) {
if (this.userid === 'zarel') {
if (this.userid === 'zarel' && config.backdoor) {
// This is the Zarel backdoor.
// Its main purpose is for situations where someone calls for help, and