mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
Allow ## and ++ for opchat/adminchat still for laziness.
This commit is contained in:
parent
141ed08d08
commit
c0d365f71f
@ -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);
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user