[Plus Emulator] Fixed Group Forums

Paypal

Freelance developer
Apr 1, 2017
310
131
Hey, I was asked by @Oasis to fix group forums so i decided to fix it and release it to help others

Major Note
There is a small issue in the group forums but if you leave it then it will f*ck it up. The issue is that if you delete a group the forums don't have ON DELETE CASCADE so it won't delete the forum when you delete the group so it'll reference a null ID.

NOTE: I am just giving the files everything is within it and this is just @Westyy's release but with purchasing the forum being fixed and other fixes.
Also you are going to need to create tables for this to work with the SQL Queries

Tables link:
Note: Run groups.sql first then run the others sql's with no particular order. It'll create a test group with ID 6, and the user ID 27 is owner of it.

Download link:
Live:

Dont ask stupid questions on how to fix any issues like "How do i remove the insert?"

Credits
Westyy (For his release)
Me( For releasing the fixed version and fixing group forums)
Luke (For fixing group forums)
Ash (For pointing out packets ID needed to be fixed)
 
Last edited:

andrexy0

New Member
Jun 20, 2017
27
4
LWZZuo2cTBGBHw_nw7qyFg.png


I got these errors here, use Release 2.
 

andrexy0

New Member
Jun 20, 2017
27
4
ljkPK4Q2T5eZcfHaYWXIMQ.png

CS0234 C# The type or namespace name "Forums" does not exist in the namespace "Plus.HabboHotel.Groups" (are you missing an assembly reference?)
CS0234 C# The type or namespace name "GroupForumManager" does not exist in the namespace (are you missing an assembly reference?)
CS0234 C# The type or namespace name "GroupForumManager" does not exist in the namespace (are you missing an assembly reference?)
CS0246 C# The type or namespace name "Forums" does not exist in the namespace "Plus.HabboHotel.Groups" (are you missing an assembly reference?)
CS0246 C# The type or namespace name "GroupForum" could not be found (are you missing a using directive or an assembly reference?)
 

JynX

Posting Freak
Feb 6, 2016
710
438
ljkPK4Q2T5eZcfHaYWXIMQ.png

CS0234 C# The type or namespace name "Forums" does not exist in the namespace "Plus.HabboHotel.Groups" (are you missing an assembly reference?)
CS0234 C# The type or namespace name "GroupForumManager" does not exist in the namespace (are you missing an assembly reference?)
CS0234 C# The type or namespace name "GroupForumManager" does not exist in the namespace (are you missing an assembly reference?)
CS0246 C# The type or namespace name "Forums" does not exist in the namespace "Plus.HabboHotel.Groups" (are you missing an assembly reference?)
CS0246 C# The type or namespace name "GroupForum" could not be found (are you missing a using directive or an assembly reference?)
You need to right click on the red underlined word and hit "recommended something" forget what it says, but click that and it should have you add a
Code:
using Plus.something.something;
Should work after that.
 

andrexy0

New Member
Jun 20, 2017
27
4
5G4o7VAuSqG8gKETj4ZA9g.png

Other errors now:

CS0246 C# The type or namespace name "PostUpdatedComposer" could not be found (are you missing a using directive or an assembly reference?)
CS0246 C# The type or namespace name "PostGroupContentEvent" could not be found (are you missing a using directive or an assembly reference?)
CS0117 C# "ClientPacketHeader" does not contain a definition for "UpdateForumReadMarkerMessageEvent"
CS0117 C# "ClientPacketHeader" does not contain a definition for "UpdateForumThreadStatusMessageEvent"

The errors are here:
OQCUGN4nSP6QenJ80QXkKg.png


i6NUTMCSTCqlNV9XJGmRLQ.png
 

Paypal

Freelance developer
Apr 1, 2017
310
131
@andrexy0 you havent copy-pasted the headers into your ServerPacketHeader you also seem to be missing PostUpdatedComposer and PostGroupContentEvent
 

andrexy0

New Member
Jun 20, 2017
27
4
@andrexy0 you havent copy-pasted the headers into your ServerPacketHeader you also seem to be missing PostUpdatedComposer and PostGroupContentEvent
I copy pasted the ServerPacketHeader already, and now i did it again but there errors are still there. Which files are missing?
 

Paypal

Freelance developer
Apr 1, 2017
310
131
@andrexy0 if they weren't people would have complained
Put these definitions in your ClientPacketHeader.cs:
Code:
public const int UpdateForumReadMarkerMessageEvent = 1659;
public const int UpdateForumThreadStatusMessageEvent = 2980;

Also this is the files -
PostGroupContentEvent needs to go in Communication > Packets > Incoming > Groups
PostUpdatedComposer needs to go in Communication > Packets > Outgoing > Groups
 

Paypal

Freelance developer
Apr 1, 2017
310
131
Well in my config it is like this
Code:
## PlusEMU System Configuration File
## Must be edited for the server to work

## MySQL Configuration
db.hostname=127.0.0.1
db.port=3306
db.username=root
db.password=******
db.name=bobba

## MySQL pooling setup (controls amount of connections)
db.pool.minsize=10
db.pool.maxsize=250

## Game TCP/IP Configuration
game.tcp.bindip=*******
game.tcp.port=30000
game.tcp.conlimit=100000
game.tcp.conperip=99999
game.tcp.enablenagles=true

## RCON TCP/IP Configuration
rcon.tcp.bindip=*****
rcon.tcp.port=30001
rcon.tcp.allowedaddr=******;localhost;127.0.0.1

## Client configuration
client.ping.enabled=1
client.ping.interval=20000
client.maxrequests=300

Is this a fresh install? you probably didnt finish the config to begin with
 

Central

Imagination is more important than knowledge.
Feb 22, 2015
709
107
Code:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `group_forums_logs`;
I have this error when I input groups.sql
 
Well in my config it is like this
Code:
## PlusEMU System Configuration File
## Must be edited for the server to work

## MySQL Configuration
db.hostname=127.0.0.1
db.port=3306
db.username=root
db.password=******
db.name=bobba

## MySQL pooling setup (controls amount of connections)
db.pool.minsize=10
db.pool.maxsize=250

## Game TCP/IP Configuration
game.tcp.bindip=*******
game.tcp.port=30000
game.tcp.conlimit=100000
game.tcp.conperip=99999
game.tcp.enablenagles=true

## RCON TCP/IP Configuration
rcon.tcp.bindip=*****
rcon.tcp.port=30001
rcon.tcp.allowedaddr=******;localhost;127.0.0.1

## Client configuration
client.ping.enabled=1
client.ping.interval=20000
client.maxrequests=300

Is this a fresh install? you probably didnt finish the config to begin with

rcon.tcp.bindip=*****
rcon.tcp.port=30001
rcon.tcp.allowedaddr=******;localhost;127.0.0.1
Pretty sure rcon should be mus
 

Anglo

New Member
Jun 19, 2017
24
13
Code:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `group_forums_logs`;
I have this error when I input groups.sql
PHP:
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `desc` varchar(255) NOT NULL,
  `badge` varchar(50) NOT NULL,
  `owner_id` int(11) unsigned NOT NULL,
  `created` int(50) NOT NULL,
  `room_id` int(10) unsigned NOT NULL DEFAULT '0',
  `state` enum('0','1','2') NOT NULL DEFAULT '0',
  `colour1` int(11) NOT NULL DEFAULT '242424',
  `colour2` int(11) NOT NULL DEFAULT '242424',
  `admindeco` enum('0','1') NOT NULL DEFAULT '1',
  `has_forum` enum('1','0') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`) USING BTREE,
  KEY `room_id` (`room_id`),
  KEY `owner` (`owner_id`)
) AUTO_INCREMENT=7;

DROP TABLE IF EXISTS `group_forums_logs`;
CREATE TABLE `group_forums_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `thread_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_settings`;
CREATE TABLE `group_forums_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `who_can_read` int(11) NOT NULL,
  `who_can_post` int(11) NOT NULL,
  `who_can_init_discussions` int(11) NOT NULL,
  `who_can_mod` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_thread_posts`;
CREATE TABLE `group_forums_thread_posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT NULL,
  `message` varchar(255) NOT NULL,
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  `thread_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_thread_views`;
CREATE TABLE `group_forums_thread_views` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `thread_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT '0',
  `user_id` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_threads`;
CREATE TABLE `group_forums_threads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT NULL,
  `caption` varchar(255) NOT NULL,
  `pinned` enum('0','1') NOT NULL DEFAULT '0',
  `locked` enum('0','1') NOT NULL DEFAULT '0',
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  `forum_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

INSERT INTO `groups` VALUES (6, 'Test', '', 'b05114s06114s78010', 27, 1497934864, 27, '0', 1, 1, '0', '1');
If you're having a problem with executing groups.sql just copy and run the query above, there was missing semicolons at the end of every CREATE TABLE.
 

Joshhh

Member
Apr 13, 2016
325
177
PHP:
DROP TABLE IF EXISTS `groups`;
CREATE TABLE `groups` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `desc` varchar(255) NOT NULL,
  `badge` varchar(50) NOT NULL,
  `owner_id` int(11) unsigned NOT NULL,
  `created` int(50) NOT NULL,
  `room_id` int(10) unsigned NOT NULL DEFAULT '0',
  `state` enum('0','1','2') NOT NULL DEFAULT '0',
  `colour1` int(11) NOT NULL DEFAULT '242424',
  `colour2` int(11) NOT NULL DEFAULT '242424',
  `admindeco` enum('0','1') NOT NULL DEFAULT '1',
  `has_forum` enum('1','0') NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`) USING BTREE,
  KEY `room_id` (`room_id`),
  KEY `owner` (`owner_id`)
) AUTO_INCREMENT=7;

DROP TABLE IF EXISTS `group_forums_logs`;
CREATE TABLE `group_forums_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `thread_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_settings`;
CREATE TABLE `group_forums_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `group_id` int(11) NOT NULL,
  `who_can_read` int(11) NOT NULL,
  `who_can_post` int(11) NOT NULL,
  `who_can_init_discussions` int(11) NOT NULL,
  `who_can_mod` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_thread_posts`;
CREATE TABLE `group_forums_thread_posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT NULL,
  `message` varchar(255) NOT NULL,
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  `thread_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_thread_views`;
CREATE TABLE `group_forums_thread_views` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `thread_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT '0',
  `user_id` int(11) NOT NULL,
  `count` int(11) NOT NULL,
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

DROP TABLE IF EXISTS `group_forums_threads`;
CREATE TABLE `group_forums_threads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `timestamp` int(11) DEFAULT NULL,
  `caption` varchar(255) NOT NULL,
  `pinned` enum('0','1') NOT NULL DEFAULT '0',
  `locked` enum('0','1') NOT NULL DEFAULT '0',
  `deleted_level` int(11) NOT NULL,
  `deleter_user_id` int(11) NOT NULL,
  `forum_id` int(11) NOT NULL,
  PRIMARY KEY (`id`)
);

INSERT INTO `groups` VALUES (6, 'Test', '', 'b05114s06114s78010', 27, 1497934864, 27, '0', 1, 1, '0', '1');
If you're having a problem with executing groups.sql just copy and run the query above, there was missing semicolons at the end of every CREATE TABLE.
 

Paypal

Freelance developer
Apr 1, 2017
310
131
Code:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP TABLE IF EXISTS `group_forums_logs`;
I have this error when I input groups.sql
 



Pretty sure rcon should be mus
RCON is a type of protocol used by the emu. The config is unrelated to your issue anyway -you need to check his SQL database. @Anglo fixed your problem by giving you that sql
 
change forum_enabled to has_forum
 

Users who are viewing this thread

Top