Informations
Jump to content

Lorem Ipsum...

Click to Dismiss this Notification
Ładowanie danych...

Code Enhancement for Guild Post Comment Flood Control


Recommended Posts

In this guide, we'll explore how to manage comment posting within a guild system, specifically focusing on preventing excessive posting and ensuring a smoother experience for all players. This adjustment makes use of certain checks to manage the frequency of comments, thereby maintaining the integrity of interactions within the guild.

Steps to Implement Comment Flood Control

  1. Create a Guild

    • To start this system, you need to set up your guild properly.
  2. Modify the UI

    • Navigate to the uiGuild.py file and insert the following line within the OnUpdate function:
       
  1. Monitor MySQL Process

    • Open your terminal (e.g., Putty) and execute the command top. This will allow you to observe the MySQL process's performance and load.
  2. Check the Database Table

    • Inspect the player.guild_comment table to see any updates or changes following your interventions.

Code Modifications

1. Update guild.h

In the guild.h file:

Search for:

 
This is the hidden content, please

Then add the following line:

 
This is the hidden content, please

2. Update guild.cpp

Within the guild.cpp file:

Search for the function:

 
This is the hidden content, please

Replace the function with:

 
This is the hidden content, please

This revised function will ensure that players cannot spam comments, as the system enforces a 10-minute cooldown between submissions. If they try to comment before the cooldown ends, they'll be notified of how long they need to wait.

 

Following these steps and changes will contribute to a cleaner and more manageable guild comment system, preventing comment flooding while keeping players informed about the posting rules. Enjoy a more organized interaction environment within your guild!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

spacer.png

Disable AdBlock
The popup will be closed in 5 seconds...