Jump to content

Offline Message System


Recommended Posts

  • Honorable Member

M2 Download Center

This is the hidden content, please
( Internal )

This is the hidden content, please
( 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 105
  • Eyes 1
  • Dislove 1
  • Angry 1
  • Not Good 1
  • Think 1
  • Confused 2
  • Scream 1
  • Lmao 1
  • Good 30
  • Love 6
  • Love 54

 

Link to comment
Share on other sites

  • 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.

  • Good 1
  • Love 2

 

Link to comment
Share on other sites

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 comment
Share on other sites

  • 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 comment
Share on other sites

  • 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 comment
Share on other sites

  • Forum Moderator
On 2/23/2021 at 4:26 PM, 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

This is the hidden content, please

  • Srcs/Client/UserInterface/Locale_Inc.h
#define BL_OFFLINE_MESSAGE

 

Thanks for the release! @Mali61

 

Edited by VegaS™
  • Metin2 Dev 15
  • Good 3
  • Love 9
Link to comment
Share on other sites

  • 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 comment
Share on other sites

  • Forum 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 comment
Share on other sites

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 comment
Share on other sites

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
  • Good 2

spacer.png

Link to comment
Share on other sites

  • 7 months later...
  • 4 months later...

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.