Jump to content

champ

Administrators
  • Content Count

    155
  • Joined

  • Last visited

  • Days Won

    32

Everything posted by champ

  1. What makes you believe you're under DDoS? Firewall alone would be insufficient to mitigate the attack. DDoS attacks work by overwhelming target's resources - such as bandwidth, processing power, or concurrent connections. This can be difficult to manage with just a firewall, especially if the attack traffic volume exceeds the network's bandwidth capacity. DDoS attacks also tend to come from different IP addresses all at once with different user agents, so filtering the requests based on those might be inefficient. I would use CloudFlare or similar services that filter the requests and rate limit them before they actually reach your network! I'm only saying this so that you don't blindly pay someone to create a fix that will not achieve anything.
  2. The title explicitly says you need visual studio 2017 to compile.
  3. Насколько удобно открывать и закрывать окно чата на телефоне будучи на картах с пвп?
  4. I've not used LuaSQL before but based on your code you are only creating a table that holds the necessary connection information to an SQL server. So, to put this into perspective, you have basically defined what is needed to connect to the SQL Server but not how to do it. You have this condition: if SQLConnector.sql == 1 then It fails because you cannot compare your lua table to a number and it will always return False, which in your case equates to "print("Connection failed!")". I have just done some research and found the following docs: LUA_ARG_ERROR = 10 SQL_SUCCESS = 0 SQL_SUCCESS_WITH_INFO = 1 SQL_ERROR = -1 SQL_INVALID_HANDLE = -2 SQL_NO_DATA = 100 ************************************************************************************************** connect function Summary: Establishes connection to SQL Server driver. Syntax: LuaSql("connect", host, username, password) Arguments: host - SQL Server address username - SQL Server username password - SQL Server password Returns: 1 on success, 0 on failure, connection handle id on success else LUA_ARG_ERROR, SQL_ERROR, or SQL_INVALID_HANDLE. ************************************************************************************************** query function Summary: Submits SQL statement Syntax: LuaSql("query", connHandleId, query) Arguments: connHandleId - Connection handle id. query - Query string Returns: 1 on success, 0 on failure, statement handle id on success else LUA_ARG_ERROR, SQL_ERROR, or SQL_INVALID_HANDLE. ************************************************************************************************** fetch function Summary: Fetches the next rowset of data from the result set and returns data for all columns. Syntax: LuaSql("fetch", connHandleId, stmtHandleId) Arguments: connHandleId - Connection handle id. stmtHandleId - Statement handle id. Returns: rowset on success else LUA_ARG_ERROR, SQL_NO_DATA, SQL_ERROR, or SQL_INVALID_HANDLE. ************************************************************************************************** freehandle function Summary: Frees resources associated with a specific statement handle. Syntax: LuaSql("freehandle", connHandleId, stmtHandleId) Arguments: connHandleId - Connection handle id. stmtHandleId - Statement handle id. Returns: LUA_ARG_ERROR, SQL_SUCCESS, SQL_ERROR, or SQL_INVALID_HANDLE. ************************************************************************************************** close function Summary: Closes the connection and frees resources associated with a specific connection handle Syntax: LuaSql("close", handleId) Arguments: handleId - Connection handle id. Returns: LUA_ARG_ERROR, SQL_SUCCESS, SQL_SUCCESS_WITH_INFO, SQL_ERROR, or SQL_INVALID_HANDLE. ************************************************************************************************** QueryAsyn Summary: Executes query asynchrounously Syntax: QueryAsyn(host, user, pass, query) Arguments: host - SQL Server address username - SQL Server username password - SQL Server password query - Query string ************************************************************************************************** Based on the docs above, we can try to fix your code (might not work so please revise as needed): local SQLConnector = { host = "KHAIRUL\TEST14", user = "sa", pass = "Y87dc#$98" } local query = "SELECT * FROM some_table" -- connect to the database local connHandleId = LuaSql("connect", SQLConnector.host, SQLConnector.user, SQLConnector.pass) if connHandleId <= 0 then print("Failed to connect to the database.") end -- run a query local stmtHandleId = LuaSql("query", connHandleId, query) if stmtHandleId <= 0 then print("Failed to run the query.") end -- fetch data local rowset = LuaSql("fetch", connHandleId, stmtHandleId) if not rowset then print("Failed to fetch data.") end -- free the statement handle local result = LuaSql("freehandle", connHandleId, stmtHandleId) if result ~= 0 then print("Failed to free statement handle.") end -- close the connection local result = LuaSql("close", connHandleId) if result ~= 0 and result ~= 1 then print("Failed to close the connection.") end -- do something with rowset print(rowset)
  5. I’m not forcing anybody to use this. When I ran my server, I had hundreds of advertisements sent accords my channels from other servers’ owners on a daily basis.
  6. Yes, it is possible.
  7. You’re not paying attention to the error message: msg parse resource file [./resource/garner\garnerNPC.txt] failed ,No [190 Starter - Npc], please chech format and version! it clearly states that the error is in garnerNPC.txt on line 190. Npc ID: 190, npc name: Starter - Npc You need to check that line out
  8. Your error message states to check the format and version of your new npc entry - this suggests you might have not used tabs correctly or perhaps missed out on certain required fields (basically the format of your new npc line does not match the required format, check the ones that are working for reference)
  9. champ

    Pm disabled

    I mean, if you have no idea what values you have modified in the executable, I’m not entirely sure what sort of help we can provide Based on the information you have provided, all I could suggest is change some hex values in game.exe and that might fix it!
  10. You can use role permissions so that users inside your discord server with an unassigned role are unable to see a list of other users and then assign the necessary permissions only once their account has been validated. This way, bots will not be able to privately message your players
  11. Food for thought: we can create a “report message” command and then upon approval programmatically extract regex pattern from string and append it to our patterns.txt If many enough people are interested, then I can try to implement it.
  12. Stop *annoying* users from advertising in your discord server. Find out how to here.

  13. Hi all! We all know that certain users in this community tend to spam other discord servers with their ads, which sometimes can be rather annoying. I wish sometimes I had created this bot when I was running my server. Either way, I created a simple python bot that will prevent users from advertising on your server. It is fairly simple and doesn't involve any sort of complex logic. Feel free to modify it as needed, to make it even more challenging for bots, you could perhaps include AI into creating responses (for instance set up chatgpt api calls), which I'm not going to cover today. Introduction The Discord Anti-Advertisement Bot is designed to prevent users from posting advertisements on a Discord server. The bot monitors messages and deletes any content that it identifies as advertising. Additionally, the bot sends a challenge to new members to verify that they are not bots. Features Detects and deletes advertisement messages. Bans users who exceed the maximum number of advertisement violations. Sends a challenge to new members to verify they are not bots. Automatically assigns a "Bots" role to bots when they join the server. Supports customizable command prefix and challenge questions. Bot Permissions To function correctly, the bot requires the following permissions: Read Messages: To monitor messages in the server. Send Messages: To notify users about their violations and send challenge messages. Manage Messages: To delete advertisement messages. Ban Members: To ban users who exceed the maximum number of violations. Kick Members: To kick users who fail the new member challenge. Manage Roles: To assign roles to bots when they join the server. Configuration 1. Create a new bot To create a new bot, follow these steps: Go to the Discord Developer Portal and sign in with your Discord account. Click "New Application" in the top right corner and enter a name for your application. Navigate to the "Bot" tab on the left sidebar and click "Add Bot." Under the "Token" section, click "Copy" to copy the bot token. 2. Set up the code Clone the bot's repository or download the source code, and make sure you have Python installed. git clone https://github.com/bsgeorgi/discord-anti-ad-bot.git Optionally, you can create a virtual environment and execute your code from there: python -m venv venv venv/Scripts/activate Install the required dependencies using the following command: pip install -r requirements.txt 3. Configure the bot Modify config.py file in the same directory as your bot's code. Replace TOKEN with the token you copied in step 1. You can customize the following settings: TOKEN: The bot token. VIOLATIONS_FILE: The JSON file used to store user violations. MAX_VIOLATIONS: The maximum number of advertisement violations before a user is banned. ALLOWED_DOMAINS: A list of domains that will not trigger the bot's advertising detection. challenges: A list of challenge questions for new members. Each question is a tuple containing a string question and a list of acceptable string answers. 4. Start the bot Run the bot with the following command: python bot.py 5. Invite the bot to your server To invite the bot to your server, follow these steps: Go to the Discord Developer Portal and sign in with your Discord account. Click on your application, then navigate to the "OAuth2" tab on the left sidebar. In the "Scopes" section, select "bot." In the "Bot Permissions" section, select the permissions mentioned earlier in this guide. Copy the generated URL from the "Scopes" section and paste it into a new browser tab. Choose the server where you want to add the bot and click "Authorize." Now, your bot should be a member of your server and will start monitoring messages and performing its tasks. Usage Commands The bot currently has one built-in command: !hello: The bot responds with "Hello!". To use this command, type the command in a text channel in your Discord server. New Member Verification When a new member joins the server, the bot will send them a direct message with a challenge question. The new member must answer the question correctly within 30 seconds. If they answer incorrectly or don't respond within the time limit, they will be kicked from the server. They can rejoin and try again. Advertisement Detection and Handling The bot will continuously monitor messages in the server. If it detects a message containing an advertisement, it will delete the message and notify the sender about their violation. If the user reaches the maximum number of violations (configured in config.py), they will be banned from the server. Customization You can further customize the bot by modifying the code or adding new commands. To add new commands, follow the instructions provided earlier in this conversation. To modify the advertisement detection patterns, edit the patterns.txt file in the bot's directory. Advertisement Patterns I will not go into too much detail when it comes to creating regex patterns, please feel free to do your own research. However, I will explain a couple of patterns from the patterns.txt file. In the provided examples, there are two regular expressions: (?:come\s+)?(play|try|join|check\sout|check) my (new|awesome|amazing|incredible) (game|app|server) This regular expression is composed of several components: (?:come\s+)?: The (?: ... ) is a non-capturing group. It allows you to apply quantifiers to part of your regex without capturing the matched text. In this case, the ? quantifier means the group can occur 0 or 1 times. \s+ represents one or more whitespace characters. So, this part of the regex matches an optional "come" followed by at least one whitespace character. (play|try|join|check\sout|check): This is a capturing group, and the | symbol is an "or" operator, meaning any of the alternatives inside the group can be matched. In this case, the regex will match "play," "try," "join," "check out," or "check." my: Matches the literal string "my." (new|awesome|amazing|incredible): Another capturing group, this time matching any of the adjectives: "new," "awesome," "amazing," or "incredible." (game|app|server): The final capturing group matches one of the following words: "game," "app," or "server." https?://(www\.)?discord\.(?:gg|com/invite)/[^\s]+ This regex is designed to match Discord invite links: https?://: Matches the literal string "http://" or "https://" (the ? makes the "s" optional). (www\.)?: Matches an optional "www." string, with the ? making it optional. discord\.: Matches the literal string "discord." (the backslash is used to escape the dot, as it has a special meaning in regex). (?:gg|com/invite): A non-capturing group that matches either "gg" or "com/invite". /: Matches the literal forward slash character. [^\s]+: The square brackets [] denote a character class, and the ^ symbol inside the brackets negates the class. So, [^\s] means any character that is not a whitespace character. The + quantifier means one or more occurrences of the non-whitespace character. These regular expressions are used in the bot to detect specific patterns related to advertising and can be customized by modifying the patterns.txt file in the bot's directory. Good luck and hope this helps!
  14. Очень много воды, но мало смысла. - В чём суть сценариста и какие задачи? - Какая выгода? - Какой объем работы и что уже готово? - Есть ли сайт проекта, дискорд? Советую писать об этом в оригинальном сообщении. Очень многие не станут писать вам индивидуально и пытаться выяснять данную информацию.
  15. Здорово! Как освобожусь с работой, зайду поиграть ненадолго! поправка: когда ожидается запуск?
  16. Hi @SeaTown Online! Out of curiosity, is there any particular reason behind the previous server reset?
  17. Привет. А зачем писать новый гейт на шарпе? Он нативно будет работать медленнее плюсов. Если уж и решитесь переносить всё это дело и обновлять, не имеет ли больше смысла переписать на модернизированном с++?
  18. I’ve had a glance through your code before @V3ct0r and originally published website code is safe to use (although it could do with an upgrade of the php version).
  19. This particular warning is shown due to you using a plus sign rather than a dot to concatenate strings. PHP uses dots to do that (inherited from Pearl), this behaviour can be tested using a PHP compiler. I have attached two screenshots of me running tests using different PHP compilers (versions 7 and 8). Using version 7 outputs the warning that you see, now if you upgrade to version 8 then the developers have explicitly converted this warning into an exception, so the code will not work (running this code on php < 7 should not show any errors, which could lead to invalid application logic behaviour).
  20. Try to replace it to: $hash = md5($name . time()); time() method might also need to be casted to string before concatenation.
  21. Make sure your game server supports GMNotice function.
  22. Following the logic, the player should not receive your HelpInfo as they are kicked out before that packet is actually sent out (that’s my assumption, as I can’t see a HelpInfo method in your code).
  23. Очень здорово! С нетерпением жду увидеть, как это всё дело будет продвигаться дальше!
  24. I’ve edited your post to remove the bit which is against the community rules @Sharshabel I strongly encourage you to watch your language next time.
  25. I have removed everything written in another language, as I’d like to remind everyone that this is an English speaking section. Topic has been locked.
×
×
  • Create New...