mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-25 07:22:09 -05:00
Modifications to Zarel backdoor:
- old backdoor from chat-commands removed - now governed by a setting in the config file
This commit is contained in:
parent
edd61c36fa
commit
d0e9d9cea7
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
2
users.js
2
users.js
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user