Jump to content

Offline Message System


Recommended Posts

  • Honorable Member

M2 Download Center

Download Here ( Internal )

Download Here ( GitHub )

242433B83zfMt.png
242433wCcCQPs.png

 

No need to say anything, it's just offline private message system.

It keeps messages at db instead of txt.

There is a 5 hour time limit for offline messages. After this time the message will be deleted automatically.

  • Metin2 Dev 3
  • Love 13
  • Love 3
  • Lmao 1
  • Think 1
  • Confused 1

🌛

Link to post
  • Honorable Member
On 2/22/2021 at 1:27 AM, Endymion said:

It would be a good idea to write unsent messages to the database on shutdown, and read them on boot.

I've been thinking about this topic and I decided not to do.

Listen to my excuses before you hit me:

 

When sending an Offline Message, it is not questioned whether the player's name is actually registered on the server.

If we do this, unnecessary data will constantly accumulate in MySQL.

On each restart, they will be loaded and then saved when closing.

 

It's better to clean it this way.

  • Love 2
  • Good 1

🌛

Link to post

Hi! Thank Mali! I think this is the best way to send an offline pm, but can I know how much this would be heavy on the server?

 

P.s: and it's possibile to make the offline message received in other color like light-blue? So you can see if it's an offline message or if just someone sent u a message right now

Edited by Aioria
Link to post
  • Honorable Member
28 minutes ago, Aioria said:

Hi! Thank Mali! I think this is the best way to send an offline pm, but can I know how much this would be heavy on the server?

 

P.s: and it's possibile to make the offline message received in other color like light-blue? So you can see if it's an offline message or if just someone sent u a message right now

If you are really worried about this, you can make your own time cycle for clearing data every 5-6 hours.

  • Love 1

🌛

Link to post

No I'm not worried, I just don't know xD if u say it's not that heavy I'm 100% trust you, anyway what about the offline text color? You think it's useless?

Link to post
  • Honorable Member
4 minutes ago, Aioria said:

No I'm not worried, I just don't know xD if u say it's not that heavy I'm 100% trust you, anyway what about the offline text color? You think it's useless?

No, I'm not saying it's not that heavy.

May come update soon for what you want. Wait weekend.

  • Love 1

🌛

Link to post
  • Moderator
52 minutes ago, Aioria said:

P.s: and it's possibile to make the offline message received in other color like light-blue? So you can see if it's an offline message or if just someone sent u a message right now

  • Srcs/Server/common/length.h
	WHISPER_TYPE_GM		= 5,
	[...]
#ifdef BL_OFFLINE_MESSAGE
	WHISPER_TYPE_OFFLINE	= 6,
#endif
  • Srcs/Server/input_db.cpp
void CInputDB::ReadOfflineMessages(LPDESC desc, const char* pcData)
{
	pack.bType = WHISPER_TYPE_NORMAL;
	[...]
	pack.bType = WHISPER_TYPE_OFFLINE;
}
  • Srcs/Client/UserInterface/PythonChat.h
			WHISPER_TYPE_GM                 = 5,
			[...]
#ifdef BL_OFFLINE_MESSAGE
			WHISPER_TYPE_OFFLINE            = 6,
#endif
  • Srcs/Client/UserInterface/PythonChat.cpp
		case CPythonChat::WHISPER_TYPE_GM:
			pChatLine->Instance.SetColor(D3DXCOLOR(1.0f, 0.632f, 0.0f, 1.0f));
			break;
		[...]
#ifdef BL_OFFLINE_MESSAGE
		case CPythonChat::WHISPER_TYPE_OFFLINE:
			pChatLine->Instance.SetColor(0xffb9f2ff);
			break;
#endif
  • Srcs/Client/UserInterface/Locale_Inc.h
#define BL_OFFLINE_MESSAGE

 

Thanks for the release! @Mali61

 

Edited by VegaS™
  • Metin2 Dev 1
  • Love 4
Link to post
  • Honorable Member
1 hour ago, VegaS™ said:
  • Thanks for the release! @Mali61

 

I just updated the topic. thanks ❤️

 

1 hour ago, Aioria said:

No I'm not worried, I just don't know xD if u say it's not that heavy I'm 100% trust you

There is a 5 hour time limit for offline messages. After this time the message will be deleted automatically.

  • Love 4

🌛

Link to post

Anyway i'm trying to add this but i got an error when compiling with "duplicate case":

 

233934VirtualBox-Freebsd-11.2-32bit-clea

 

HEADER_GD_SHOP_NAME

HEADER_GD_SHOP_CLOSE

HEADER_GD_REQUEST_OFFLINE_MESSAGES

HEADER_GD_SEND_OFFLINE_MESSAGE

 

how to solve?

Edited by Aioria
Link to post
  • Moderator
56 minutes ago, Aioria said:

Anyway i'm trying to add this but i got an error when compiling with "duplicate case":

how to solve?

Duplicate case value, it's exactly what the error says.

You've already defined other cases with the same values, for fixing it, edit the values from the enumeration declaration, you can find them in common/tables.h.

 

 

  • Love 1
Link to post

Thank you Vegas y.y Sorry i'm very noob, anyway i got this error now:

 

234931VirtualBox-Freebsd-11.2-32bit-clea

 

----------------------------- EDIT

 

Ok, I solve that, now it works! anyway I noticed that if a GM send an offline pm, it will be a normal pm, not "GM", I don't know if you want it like this

Edited by Aioria
Link to post

is that normal that i can Pn offline user that have PN block on ? and if that users log in they still have pn block on but every user can pn him he have to refresh pn block.

Link to post
  • VIP
Posted (edited)
On 2/23/2021 at 10:49 PM, Aioria said:

Thank you Vegas y.y Sorry i'm very noob, anyway i got this error now:

 

234931VirtualBox-Freebsd-11.2-32bit-clea

 

----------------------------- EDIT

 

Ok, I solve that, now it works! anyway I noticed that if a GM send an offline pm, it will be a normal pm, not "GM", I don't know if you want it like this

 What is the solution to this? 

EDIT: my fault, i was careless while writing.. :P

Edited by HUNgarocel1

spacer.png

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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

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.