Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case "OFFLINEBAN":
- BanDetails b = new BanDetails();
- DateTime dt = new DateTime();
- BanHandler.BanType banType = new BanHandler.BanType();
- dt = DateTime.Now;
- if (query[4] == "m")
- {
- b.Expires = dt.AddMinutes(double.Parse(query[3])).Ticks;
- }
- else if (query[4] == "h")
- {
- b.Expires = dt.AddHours(double.Parse(query[3])).Ticks;
- }
- else if (query[4] == "d")
- {
- b.Expires = dt.AddDays(double.Parse(query[3])).Ticks;
- }
- else if (query[4] == "y")
- {
- b.Expires = dt.AddYears(int.Parse(query[3])).Ticks;
- }
- b.Issuer = str1;
- b.IssuanceTime = dt.Ticks;
- b.Id = query[1];
- b.OriginalName = query[2];
- b.Reason = query[5];
- if (query[1].Length == 23)
- {
- banType = (BanHandler.BanType)0;
- }
- else
- {
- banType = (BanHandler.BanType)1;
- }
- BanHandler.IssueBan(b, banType);
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement