Jump to content

Official Block System - Messenger


Recommended Posts

1 hour ago, narcisxb said:

Does anyone have the code updated for newer versions of C++?

auto_ptr doesn t work, bind1st appears to be utterly removed from C++ after 2017 and mem_fun also does not work anymore.

You need to look for their current version. You can use google. Like auto_ptr - > unique_ptr and i think the bind1st is just std::bind and mem_fun not needed when you use std:bind...

Edited by CsanMag
Link to comment
Share on other sites

2 hours ago, CsanMag said:

You need to look for their current version. You can use google. Like auto_ptr - > unique_ptr and i think the bind1st is just std::bind and mem_fun not needed when you use std:bind...

I did just that and it compiled. (replaced auto ptr with unique ptr and used bind)

But I have the following issues:

Any ideea why I get the same messages no matter if player 1 blocks player 2? (Player 1 block Player2 and Player2 gets this: You can t do this action because you blocked Player 1. Even tho Player1 is the one who blocked Player2 and Player2 should get: You can t do this action because Player1 blocked you?

Edited by narcisxb
  • Love 1
Link to comment
Share on other sites

  • 3 months later...
  • Bronze

Good evening, I'm trying to find a new add-on, I want to block chat and not just PM

When I exclude a player, I want the conversations to be blocked as chat

1) PM blocking

2) Chat Blocking

I tried to edit the system but I can not 😞

I wanted to block the chat along with the PM

Any idea????????

  • Metin2 Dev 1
Link to comment
Share on other sites

  • 6 months later...
On 2/21/2022 at 1:49 AM, Draveniou1 said:

Good evening, I'm trying to find a new add-on, I want to block chat and not just PM

When I exclude a player, I want the conversations to be blocked as chat

1) PM blocking

2) Chat Blocking

I tried to edit the system but I can not 😞

I wanted to block the chat along with the PM

Any idea????????

+1 How can we block the message in the general chat of the player we blocked?

Link to comment
Share on other sites

  • 11 months later...
  • Bronze
On 4/26/2021 at 3:09 AM, klynaTz said:
Search:

			if (test_server)
				sys_log(0, "Whisper to %s from %s (Channel %d Mapindex %d)", "Null", ch->GetName(), pkCCI->bChannel, pkCCI->lMapIndex);

Add below:

#ifdef __MESSENGER_BLOCK_SYSTEM__
			if (MessengerManager::instance().CheckMessengerList(ch->GetName(), pkCCI->szName, MESSENGER_BLOCK))
			{
				if (ch->GetDesc())
				{
					TPacketGCWhisper pack;

					char msg[CHAT_MAX_LEN + 1];
					snprintf(msg, sizeof(msg), LC_TEXT("Unblock %s to continue."), pkCCI->szName);
					int len = MIN(CHAT_MAX_LEN, strlen(msg) + 1);

					pack.bHeader = HEADER_GC_WHISPER;
					pack.wSize = sizeof(TPacketGCWhisper) + len;
					pack.bType = WHISPER_TYPE_SYSTEM;
					strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom));

					TEMP_BUFFER buf;

					buf.write(&pack, sizeof(TPacketGCWhisper));
					buf.write(msg, len);
					ch->GetDesc()->Packet(buf.read_peek(), buf.size());

					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("Unblock %s to continue."), pkCCI->szName);
				}
				return iExtraLen;
			}
			else if (MessengerManager::instance().CheckMessengerList(pkCCI->szName, ch->GetName(), MESSENGER_BLOCK))
			{
				if (ch->GetDesc())
				{
					TPacketGCWhisper pack;

					char msg[CHAT_MAX_LEN + 1];
					snprintf(msg, sizeof(msg), LC_TEXT("%s has blocked you."), pkCCI->szName);
					int len = MIN(CHAT_MAX_LEN, strlen(msg) + 1);

					pack.bHeader = HEADER_GC_WHISPER;
					pack.wSize = sizeof(TPacketGCWhisper) + len;
					pack.bType = WHISPER_TYPE_SYSTEM;
					strlcpy(pack.szNameFrom, pinfo->szNameTo, sizeof(pack.szNameFrom));

					TEMP_BUFFER buf;

					buf.write(&pack, sizeof(TPacketGCWhisper));
					buf.write(msg, len);
					ch->GetDesc()->Packet(buf.read_peek(), buf.size());

					ch->ChatPacket(CHAT_TYPE_INFO, LC_TEXT("%s has blocked you."), pkCCI->szName);
				}
				return iExtraLen;
			}
#endif

Thank youuu!!! This works perfectly for me for p2p block!

spacer.png

Link to comment
Share on other sites

  • Premium
On 8/25/2023 at 9:56 PM, SCOOB said:

Thank youuu!!! This works perfectly for me for p2p block!

Now delete the player from block list and send him an message from core99 (or any different core) to to an player from core1 using his name by pressing SHIFT+ENTER

Edited by DemOnJR

plague.png.1f5de75b42146262dcd655a5a8078

Link to comment
Share on other sites

  • Bronze
1 hour ago, DemOnJR said:

Now delete the player from block list and send him an message from core99 (or any different core) to to an player from core1 using his name by pressing SHIFT+ENTER

https://metin2.download/video/EQvvTJMZ3cTBYE3o9Z0480rNEr2hWtWF/.mp4

Edited by Metin2 Dev International
Core X - External 2 Internal

spacer.png

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...
  • Bronze
On 9/8/2023 at 5:07 PM, DemOnJR said:

Nope, will not work if you now teleport to another core same ch you will see what i mean.

Yeah, this system is fully bugged with a lot of exploits, better to just create a python block system.

https://metin2.download/video/r0lXilVmqmA3N9j3k79m7Qf9u6d0G1eK/.mp4

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Facepalm 1
  • Not Good 1

spacer.png

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / 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.