mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-26 14:54:12 -04:00
Cleanup /gcrules.
This commit is contained in:
parent
4e78c32497
commit
6f06dff408
@ -26,31 +26,12 @@ namespace MCGalaxy.Commands
|
|||||||
public override bool museumUsable { get { return true; } }
|
public override bool museumUsable { get { return true; } }
|
||||||
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
|
public override LevelPermission defaultRank { get { return LevelPermission.Guest; } }
|
||||||
public CmdGcrules() { }
|
public CmdGcrules() { }
|
||||||
//bla
|
|
||||||
public override void Use(Player p, string message)
|
|
||||||
{
|
|
||||||
RulesMethod(p);
|
|
||||||
p.Readgcrules = true;
|
|
||||||
p.Timereadgcrules = DateTime.Now;
|
|
||||||
}
|
|
||||||
public void RulesMethod(Player p)
|
|
||||||
{
|
|
||||||
Player.SendMessage(p, "&cBy using the Global Chat you agree to the following rules:");
|
|
||||||
Player.SendMessage(p, "1. No Spamming");
|
|
||||||
Player.SendMessage(p, "2. No Advertising (Trying to get people to come to your server)");
|
|
||||||
Player.SendMessage(p, "3. No links");
|
|
||||||
Player.SendMessage(p, "4. No Excessive Cursing (You are allowed to curse, but not pointed at anybody)");
|
|
||||||
Player.SendMessage(p, "5. No use of $ Variables.");
|
|
||||||
Player.SendMessage(p, "6. English only. No exceptions.");
|
|
||||||
Player.SendMessage(p, "7. Be respectful");
|
|
||||||
Player.SendMessage(p, "8. Do not ask for ranks");
|
|
||||||
Player.SendMessage(p, "9. Do not ask for a server name");
|
|
||||||
Player.SendMessage(p, "10. Use common sense.");
|
|
||||||
Player.SendMessage(p, "11. Don't say any server name");
|
|
||||||
|
|
||||||
|
public override void Use(Player p, string message) {
|
||||||
|
CmdGlobal.ShowRules(p, false);
|
||||||
}
|
}
|
||||||
public override void Help(Player p)
|
|
||||||
{
|
public override void Help(Player p) {
|
||||||
Player.SendMessage(p, "/gcrules - Shows global chat rules");
|
Player.SendMessage(p, "/gcrules - Shows global chat rules");
|
||||||
Player.SendMessage(p, "To chat in global chat, use /global");
|
Player.SendMessage(p, "To chat in global chat, use /global");
|
||||||
}
|
}
|
||||||
|
@ -43,14 +43,14 @@ namespace MCGalaxy.Commands
|
|||||||
if (p.muted) { Player.SendMessage(p, "You are muted."); return; }
|
if (p.muted) { Player.SendMessage(p, "You are muted."); return; }
|
||||||
if (p.ignoreGlobalChat || p.ignoreAll) { Player.SendMessage(p, "You cannot use Global Chat while you have it muted."); return; }
|
if (p.ignoreGlobalChat || p.ignoreAll) { Player.SendMessage(p, "You cannot use Global Chat while you have it muted."); return; }
|
||||||
if (Server.chatmod && !p.voice) { Player.SendMessage(p, "You cannot use Global Chat while in Chat Moderation!"); return; }
|
if (Server.chatmod && !p.voice) { Player.SendMessage(p, "You cannot use Global Chat while in Chat Moderation!"); return; }
|
||||||
if (!Server.gcaccepted.Contains(p.name.ToLower())) { RulesMethod(p); return; }
|
if (!Server.gcaccepted.Contains(p.name.ToLower())) { ShowRules(p, true); return; }
|
||||||
} //Server.GlobalChat.Say((p != null ? p.name + ": " : "Console: ") + message, p);
|
} //Server.GlobalChat.Say((p != null ? p.name + ": " : "Console: ") + message, p);
|
||||||
Server.GlobalChat.Say(p == null ? "Console: " + message : p.name + ": " + message, p);
|
Server.GlobalChat.Say(p == null ? "Console: " + message : p.name + ": " + message, p);
|
||||||
Player.GlobalMessage("%G<[Global] " + (p != null ? p.name + ": " : "Console: ") + "&f" + (Server.profanityFilter ? ProfanityFilter.Parse(message) : message), true);
|
Player.GlobalMessage("%G<[Global] " + (p != null ? p.name + ": " : "Console: ") + "&f" + (Server.profanityFilter ? ProfanityFilter.Parse(message) : message), true);
|
||||||
|
|
||||||
}
|
}
|
||||||
public void RulesMethod(Player p)
|
|
||||||
{
|
public static void ShowRules(Player p, bool showAccept) {
|
||||||
Player.SendMessage(p, "&cBy using the Global Chat you agree to the following rules:");
|
Player.SendMessage(p, "&cBy using the Global Chat you agree to the following rules:");
|
||||||
Player.SendMessage(p, "1. No Spamming");
|
Player.SendMessage(p, "1. No Spamming");
|
||||||
Player.SendMessage(p, "2. No Advertising (Trying to get people to your server)");
|
Player.SendMessage(p, "2. No Advertising (Trying to get people to your server)");
|
||||||
@ -63,10 +63,11 @@ namespace MCGalaxy.Commands
|
|||||||
Player.SendMessage(p, "9. Do not ask for a server name");
|
Player.SendMessage(p, "9. Do not ask for a server name");
|
||||||
Player.SendMessage(p, "10. Use common sense.");
|
Player.SendMessage(p, "10. Use common sense.");
|
||||||
Player.SendMessage(p, "11. Don't say any server name");
|
Player.SendMessage(p, "11. Don't say any server name");
|
||||||
|
if (showAccept)
|
||||||
Player.SendMessage(p, "&3Type /gcaccept to accept these rules");
|
Player.SendMessage(p, "&3Type /gcaccept to accept these rules");
|
||||||
}
|
}
|
||||||
public override void Help(Player p)
|
|
||||||
{
|
public override void Help(Player p) {
|
||||||
Player.SendMessage(p, "/global [message] - Send a message to Global Chat.");
|
Player.SendMessage(p, "/global [message] - Send a message to Global Chat.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ namespace MCGalaxy {
|
|||||||
{
|
{
|
||||||
if (!IPInPrivateRange(ip))
|
if (!IPInPrivateRange(ip))
|
||||||
{
|
{
|
||||||
Kick("Login failed! Try again.", true); return;
|
Kick("Login failed! Try signing in again.", true); return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -335,8 +335,6 @@ namespace MCGalaxy {
|
|||||||
prefix = (title == "") ? prefix : prefix + color + "[" + titlecolor + title + color + "] ";
|
prefix = (title == "") ? prefix : prefix + color + "[" + titlecolor + title + color + "] ";
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Readgcrules = false;
|
|
||||||
public DateTime Timereadgcrules = DateTime.MinValue;
|
|
||||||
public bool CheckIfInsideBlock() {
|
public bool CheckIfInsideBlock() {
|
||||||
ushort x = (ushort)(pos[0] / 32), y = (ushort)(pos[1] / 32), z = (ushort)(pos[2] / 32);
|
ushort x = (ushort)(pos[0] / 32), y = (ushort)(pos[1] / 32), z = (ushort)(pos[2] / 32);
|
||||||
byte head = level.GetTile(x, y, z);
|
byte head = level.GetTile(x, y, z);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user