And don't forget to put you on pervisit whitelist with /os map pervisit

This commit is contained in:
UnknownShadow200 2017-10-06 20:08:23 +11:00
parent f9ec5e2d61
commit 74a1d13650
4 changed files with 8 additions and 3 deletions

View File

@ -23,7 +23,7 @@ namespace MCGalaxy.Commands.Chatting {
public override string name { get { return "ChatRoom"; } }
public override string shortcut { get { return "cr"; } }
public override string type { get { return CommandTypes.Chat; } }
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
public override bool SuperUseable { get { return false; } }
public override CommandPerm[] ExtraPerms {
get { return new[] {

View File

@ -20,7 +20,7 @@ namespace MCGalaxy.Commands.Info {
public override string name { get { return "HasIRC"; } }
public override string shortcut { get { return "IRC"; } }
public override string type { get { return CommandTypes.Information; } }
public override LevelPermission defaultRank { get { return LevelPermission.Banned; } }
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
public override void Use(Player p, string message) {
if (message.Length > 0) { Help(p); return; }

View File

@ -1,4 +1,4 @@
/*
/*
Copyright 2010 MCSharp team (Modified for use with MCZall/MCLawl/MCGalaxy)
Dual-licensed under the Educational Community License, Version 2.0 and

View File

@ -110,6 +110,11 @@ namespace MCGalaxy.Commands.World {
Player.Message(p, "Type %T/os map resize {0} {1} {2} confirm %Sif you're sure.",
args[1], args[2], args[3]);
} else if (cmd == "PERVISIT") {
// Older realm maps didn't put you on visit whitelist, so make sure we put the owner here
if (!p.level.VisitAccess.Whitelisted.CaselessContains(p.name)) {
p.level.VisitAccess.Whitelist(null, p.name);
}
string rank = value.Length == 0 ? ServerConfig.DefaultRankName : value;
Group grp = Matcher.FindRanks(p, rank);
if (grp != null) p.level.VisitAccess.SetMin(null, grp);