Skip to content

Commit 68d83af

Browse files
authored
hammer effects (#2333)
1 parent 19faaf2 commit 68d83af

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

Zero-K.info/Controllers/UsersController.cs

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,22 @@ public ActionResult Punish(int accountID,
281281
// notify lobby of changes and post log message
282282
try
283283
{
284-
if (banLobby == true) Global.Server.KickFromServer(Global.Account.Name, acc.Name, reason);
285-
if (banMute == true) Global.Server.PublishAccountUpdate(acc);
286-
287284
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, string.Format("New penalty for {0} {1} ", acc.Name, Url.Action("Detail", "Users", new { id = acc.AccountID }, "http")));
288-
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, string.Format("Reason: {0} ", reason));
289-
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, string.Format("Duration: {0}h", banHours));
285+
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, string.Format(" - reason: {0} ", reason));
286+
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, string.Format(" - duration: {0}h ", banHours));
287+
288+
if (banLobby == true) {
289+
Global.Server.KickFromServer(Global.Account.Name, acc.Name, reason);
290+
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, " - lobby banned");
291+
}
292+
if (banMute == true) {
293+
Global.Server.PublishAccountUpdate(acc);
294+
Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, " - muted");
295+
}
296+
297+
if (banForum == true) Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, " - forum banned");
298+
if (banSpecChat == true) Global.Server.GhostChanSay(GlobalConst.ModeratorChannel, " - spec chat muted");
299+
290300
Global.Server.GhostPm(acc.Name, string.Format("Your account has received moderator action: {0}", reason));
291301
}
292302
catch (Exception ex)

0 commit comments

Comments
 (0)