mirror of
https://github.com/ClassiCube/MCGalaxy.git
synced 2025-09-24 05:03:34 -04:00
And now also for /temprankinfo
This commit is contained in:
parent
c1f13c4a5a
commit
2224bd7c07
@ -43,11 +43,12 @@ namespace MCGalaxy.Commands {
|
||||
string[] args = line.Split(' ');
|
||||
if (args.Length <= 3) continue;
|
||||
|
||||
if (args.Length == 4)
|
||||
if (args.Length == 4) {
|
||||
Player.Message(p, Action(args[1]) + " by " + args[2] + " on " + args[3]);
|
||||
else
|
||||
} else {
|
||||
Player.Message(p, Action(args[1]) + " by " + args[2] + " on " + args[3]
|
||||
+ " - " + args[4].Replace("%20", " "));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,6 +13,7 @@ or implied. See the Licenses for the specific language governing
|
||||
permissions and limitations under the Licenses.
|
||||
*/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
@ -115,11 +116,12 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
}
|
||||
|
||||
static void Info(Player p, string name) {
|
||||
foreach (string line in File.ReadAllLines(Paths.TempRanksFile)) {
|
||||
if (!line.CaselessStarts(name)) continue;
|
||||
List<string> rankings = Server.TempRanks.FindMatches(p, name, "temp rank");
|
||||
if (rankings == null) return;
|
||||
|
||||
foreach (string line in rankings) {
|
||||
PrintTempRankInfo(p, line); return;
|
||||
}
|
||||
Player.Message(p, "&cPlayer &a{0}&chas not been assigned a temporary rank.", name);
|
||||
}
|
||||
|
||||
static void List(Player p) {
|
||||
@ -150,7 +152,7 @@ namespace MCGalaxy.Commands.Moderation {
|
||||
TimeSpan delta = DateTime.Now - assigned;
|
||||
TimeSpan expireDelta = expiry - DateTime.Now;
|
||||
|
||||
Player.Message(p, "Temp rank information for {0}:", args[0]);
|
||||
Player.Message(p, "Temp rank information for {0}:", PlayerInfo.GetColoredName(p, args[0]));
|
||||
Player.Message(p, " From {0} %Sto {1}%S, by {2} &a{3} %Sago, expires in &a{4}",
|
||||
oldRank, tempRank, tempRanker,
|
||||
delta.Shorten(), expireDelta.Shorten());
|
||||
|
Loading…
x
Reference in New Issue
Block a user