Allow ## and ++ for opchat/adminchat still for laziness.

This commit is contained in:
UnknownShadow200 2017-11-06 10:33:57 +11:00
parent 141ed08d08
commit c0d365f71f
3 changed files with 15 additions and 3 deletions

View File

@ -51,9 +51,19 @@ namespace MCGalaxy {
MessageAdmins(p, text);
return true;
} else if (text[0] == '#') {
Player.Message(p, "%HIf you meant to send this to opchat, use %T/opchat " + text.Substring(1));
if (text.Length > 1 && text[1] == '#') {
MessageOps(p, text.Substring(2));
return true;
} else {
Player.Message(p, "%HIf you meant to send this to opchat, use %T##" + text.Substring(1));
}
} else if (text[0] == '+') {
Player.Message(p, "%HIf you meant to send this to adminchat, use %T/adminchat " + text.Substring(1));
if (text.Length > 1 && text[1] == '+') {
MessageAdmins(p, text.Substring(2));
return true;
} else {
Player.Message(p, "%HIf you meant to send this to adminchat, use %T++" + text.Substring(1));
}
}
return false;
}
@ -82,7 +92,7 @@ namespace MCGalaxy {
pl => (p == pl || pl.Rank >= perm) && Chat.NotIgnoring(pl, p),
displayName, message);
if (p != null) p.CheckForMessageSpam();
if (p != null) p.CheckForMessageSpam();
Logger.Log(LogType.StaffChat, "({0}): {1}: {2}", group, name, message);
Server.IRC.Say(displayName + "%S: " + message, true);
}

View File

@ -15,6 +15,7 @@ permissions and limitations under the Licenses.
namespace MCGalaxy.Commands.Chatting {
public sealed class CmdAdminChat : Command {
public override string name { get { return "AdminChat"; } }
public override string shortcut { get { return "Admin"; } }
public override string type { get { return CommandTypes.Chat; } }
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
public override CommandPerm[] ExtraPerms {

View File

@ -18,6 +18,7 @@
namespace MCGalaxy.Commands.Chatting {
public sealed class CmdOpChat : Command {
public override string name { get { return "OpChat"; } }
public override string shortcut { get { return "Op"; } }
public override string type { get { return CommandTypes.Chat; } }
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
public override CommandPerm[] ExtraPerms {