diff --git a/Common/dataobjects/Post.cs b/Common/dataobjects/Post.cs index 2bd6a83..c5bd62c 100644 --- a/Common/dataobjects/Post.cs +++ b/Common/dataobjects/Post.cs @@ -368,8 +368,6 @@ namespace FLocal.Common.dataobjects { if(transferInfo.HasValue && !transferInfo.Value.newBoard.isTransferTarget) throw new FLocalException("You cannot transfer in '" + transferInfo.Value.newBoard.name + "'"); } - if(account.user.id == this.poster.id) throw new FLocalException("You cannot punish your own posts"); - lock(this.Punish_Locker) { lock(this.thread.locker) { @@ -561,7 +559,7 @@ namespace FLocal.Common.dataobjects { } catch(NotFoundInDBException) { } - if(posterAccount != null) { + if((posterAccount != null) && (posterAccount.id != account.id)) { PMMessage newMessage = PMConversation.SendPMMessage( account, posterAccount, diff --git a/IISMainHandler/handlers/response/PunishHandler.cs b/IISMainHandler/handlers/response/PunishHandler.cs index 284ce5c..5ff59ba 100644 --- a/IISMainHandler/handlers/response/PunishHandler.cs +++ b/IISMainHandler/handlers/response/PunishHandler.cs @@ -22,7 +22,6 @@ namespace FLocal.IISHandler.handlers.response { Post post = Post.LoadById(int.Parse(context.requestParts[1])); if(!Moderator.isModerator(context.account, post.thread)) throw new FLocalException(context.account.id + " is not a moderator in board " + post.thread.board.id); - if(context.account.user.id == post.poster.id) throw new FLocalException("You cannot punish your own posts"); return new XElement[] { post.thread.board.exportToXml(context, Board.SubboardsOptions.None),