Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
PlusEMU Group Forums
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Brad" data-source="post: 401252" data-attributes="member: 17995"><p>More fixes I missed.</p><p></p><p>You'll need these files.</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Groups;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.Communication.Packets.Incoming.Groups</p><p>{</p><p> class PostGroupContentEvent : IPacketEvent</p><p> {</p><p> public void Parse(GameClient Session, ClientPacket Packet)</p><p> {</p><p> var ForumId = Packet.PopInt();</p><p> var ThreadId = Packet.PopInt();</p><p> var Caption = Packet.PopString();</p><p> var Message = Packet.PopString();</p><p></p><p> var Forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(ForumId);</p><p> if (Forum == null)</p><p> {</p><p> </p><p> return;</p><p> }</p><p></p><p> var IsNewThread = ThreadId == 0;</p><p> if (IsNewThread)</p><p> {</p><p> var Thread = Forum.CreateThread(Session.GetHabbo().Id, Caption);</p><p> var Post = Thread.CreatePost(Session.GetHabbo().Id, Message);</p><p></p><p> Session.SendMessage(new ThreadCreatedComposer(Session, Thread));</p><p> </p><p></p><p> }</p><p> else</p><p> {</p><p> var Thread = Forum.GetThread(ThreadId);</p><p> if (Thread == null)</p><p> {</p><p> Session.SendNotification("Opss!.. Forum Thread doesn't exists!");</p><p> return;</p><p> }</p><p></p><p> var Post = Thread.CreatePost(Session.GetHabbo().Id, Message);</p><p> Session.SendMessage(new ThreadReplyComposer(Session, Post));</p><p> }</p><p></p><p></p><p> }</p><p> }</p><p>}[/CODE]</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Groups;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.Communication.Packets.Incoming.Groups</p><p>{</p><p> class DeleteGroupThreadEvent : IPacketEvent</p><p> {</p><p> public void Parse(GameClient Session, ClientPacket Packet)</p><p> {</p><p> var int1 = Packet.PopInt();</p><p> var int2 = Packet.PopInt();</p><p> var int3 = Packet.PopInt();</p><p></p><p> var forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(int1);</p><p></p><p> if (forum == null)</p><p> {</p><p> Session.SendNotification("Thread Deletion Error!");</p><p> return;</p><p> }</p><p></p><p> if (forum.Settings.GetReasonForNot(Session, forum.Settings.WhoCanModerate) != "")</p><p> {</p><p> Session.SendNotification("You don't have the rights to delete this thread!");</p><p> return;</p><p> }</p><p></p><p> var thread = forum.GetThread(int2);</p><p> if (thread == null)</p><p> {</p><p> Session.SendNotification("Thread Can't be deleted 404!");</p><p> return;</p><p> }</p><p></p><p> thread.DeletedLevel = int3 / 10;</p><p></p><p> thread.DeleterUserId = thread.DeletedLevel != 0 ? Session.GetHabbo().Id : 0;</p><p></p><p> thread.Save();</p><p></p><p> string thread11 = "thread";</p><p> thread.Log(thread.Id, Session.GetHabbo().Id, thread11);</p><p> </p><p> Session.SendMessage(new ThreadsListDataComposer(forum, Session));</p><p></p><p> if (thread.DeletedLevel != 0)</p><p> Session.SendMessage(new RoomNotificationComposer("forums.thread.hidden"));</p><p> else</p><p> Session.SendMessage(new RoomNotificationComposer("forums.thread.restored"));</p><p> }</p><p> }</p><p>}[/CODE]</p><p>[CODE]using Plus.Communication.Packets.Outgoing.Groups;</p><p>using Plus.Communication.Packets.Outgoing.Rooms.Notifications;</p><p>using Plus.HabboHotel.GameClients;</p><p>using System;</p><p>using System.Collections.Generic;</p><p>using System.Linq;</p><p>using System.Text;</p><p>using System.Threading.Tasks;</p><p></p><p>namespace Plus.Communication.Packets.Incoming.Groups</p><p>{</p><p> class DeleteGroupPostEvent : IPacketEvent</p><p> {</p><p> public void Parse(GameClient Session, ClientPacket Packet)</p><p> {</p><p> var forumId = Packet.PopInt();</p><p> var threadId = Packet.PopInt();</p><p> var postId = Packet.PopInt();</p><p> var deleteLevel = Packet.PopInt();</p><p></p><p> var forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(forumId);</p><p></p><p> var thread = forum.GetThread(threadId);</p><p></p><p> var post = thread.GetPost(postId);</p><p></p><p> post.DeletedLevel = deleteLevel / 10;</p><p> post.DeleterId = Session.GetHabbo().Id;</p><p> post.Save();</p><p> string post11 = "post";</p><p> post.Log(thread.Id, Session.GetHabbo().Id, post11);</p><p> Session.SendMessage(new PostUpdatedComposer(Session, post));</p><p></p><p> if (post.DeletedLevel != 0)</p><p> Session.SendMessage(new RoomNotificationComposer("forums.message.hidden"));</p><p> else</p><p> Session.SendMessage(new RoomNotificationComposer("forums.message.restored"));</p><p> }</p><p> }</p><p>}[/CODE]</p></blockquote><p></p>
[QUOTE="Brad, post: 401252, member: 17995"] More fixes I missed. You'll need these files. [CODE]using Plus.Communication.Packets.Outgoing.Groups; using Plus.HabboHotel.GameClients; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plus.Communication.Packets.Incoming.Groups { class PostGroupContentEvent : IPacketEvent { public void Parse(GameClient Session, ClientPacket Packet) { var ForumId = Packet.PopInt(); var ThreadId = Packet.PopInt(); var Caption = Packet.PopString(); var Message = Packet.PopString(); var Forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(ForumId); if (Forum == null) { return; } var IsNewThread = ThreadId == 0; if (IsNewThread) { var Thread = Forum.CreateThread(Session.GetHabbo().Id, Caption); var Post = Thread.CreatePost(Session.GetHabbo().Id, Message); Session.SendMessage(new ThreadCreatedComposer(Session, Thread)); } else { var Thread = Forum.GetThread(ThreadId); if (Thread == null) { Session.SendNotification("Opss!.. Forum Thread doesn't exists!"); return; } var Post = Thread.CreatePost(Session.GetHabbo().Id, Message); Session.SendMessage(new ThreadReplyComposer(Session, Post)); } } } }[/CODE] [CODE]using Plus.Communication.Packets.Outgoing.Groups; using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plus.Communication.Packets.Incoming.Groups { class DeleteGroupThreadEvent : IPacketEvent { public void Parse(GameClient Session, ClientPacket Packet) { var int1 = Packet.PopInt(); var int2 = Packet.PopInt(); var int3 = Packet.PopInt(); var forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(int1); if (forum == null) { Session.SendNotification("Thread Deletion Error!"); return; } if (forum.Settings.GetReasonForNot(Session, forum.Settings.WhoCanModerate) != "") { Session.SendNotification("You don't have the rights to delete this thread!"); return; } var thread = forum.GetThread(int2); if (thread == null) { Session.SendNotification("Thread Can't be deleted 404!"); return; } thread.DeletedLevel = int3 / 10; thread.DeleterUserId = thread.DeletedLevel != 0 ? Session.GetHabbo().Id : 0; thread.Save(); string thread11 = "thread"; thread.Log(thread.Id, Session.GetHabbo().Id, thread11); Session.SendMessage(new ThreadsListDataComposer(forum, Session)); if (thread.DeletedLevel != 0) Session.SendMessage(new RoomNotificationComposer("forums.thread.hidden")); else Session.SendMessage(new RoomNotificationComposer("forums.thread.restored")); } } }[/CODE] [CODE]using Plus.Communication.Packets.Outgoing.Groups; using Plus.Communication.Packets.Outgoing.Rooms.Notifications; using Plus.HabboHotel.GameClients; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Plus.Communication.Packets.Incoming.Groups { class DeleteGroupPostEvent : IPacketEvent { public void Parse(GameClient Session, ClientPacket Packet) { var forumId = Packet.PopInt(); var threadId = Packet.PopInt(); var postId = Packet.PopInt(); var deleteLevel = Packet.PopInt(); var forum = PlusEnvironment.GetGame().GetGroupForumManager().GetForum(forumId); var thread = forum.GetThread(threadId); var post = thread.GetPost(postId); post.DeletedLevel = deleteLevel / 10; post.DeleterId = Session.GetHabbo().Id; post.Save(); string post11 = "post"; post.Log(thread.Id, Session.GetHabbo().Id, post11); Session.SendMessage(new PostUpdatedComposer(Session, post)); if (post.DeletedLevel != 0) Session.SendMessage(new RoomNotificationComposer("forums.message.hidden")); else Session.SendMessage(new RoomNotificationComposer("forums.message.restored")); } } }[/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
Server Releases
PlusEMU Group Forums
Top