Skip to content

Commit

Permalink
block person djoining deleted faction
Browse files Browse the repository at this point in the history
  • Loading branch information
Licho1 committed Sep 14, 2014
1 parent 8971aec commit c45cc7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zero-K.info/Controllers/FactionsController.cs
@@ -1,4 +1,5 @@
using System.Linq;
using System;
using System.Linq;
using System.Web.Mvc;
using LobbyClient;
using ZkData;
Expand Down Expand Up @@ -27,6 +28,7 @@ public class FactionsController: Controller
acc.FactionID = id;

Faction faction = db.Factions.Single(x => x.FactionID == id);
if (faction.IsDeleted) throw new ApplicationException("Cannoy join deleted faction");
db.Events.InsertOnSubmit(Global.CreateEvent("{0} joins {1}", acc, faction));
db.SubmitChanges();
return RedirectToAction("Index", "Factions");
Expand Down

0 comments on commit c45cc7d

Please sign in to comment.