Honorable Member Mali 41867 Posted February 21, 2021 Honorable Member Share Posted February 21, 2021 M2 Download Center This is the hidden content, please Sign In or Sign Up ( Internal ) This is the hidden content, please Sign In or Sign Up ( GitHub ) 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. 114 1 1 1 1 1 2 1 1 32 6 60 Link to comment Share on other sites More sharing options...
Endymion 320 Posted February 21, 2021 Share Posted February 21, 2021 It would be a good idea to write unsent messages to the database on shutdown, and read them on boot. 1 1 2 Link to comment Share on other sites More sharing options...
edwardcrkz 20 Posted February 22, 2021 Share Posted February 22, 2021 Congratulations. Link to comment Share on other sites More sharing options...
Honorable Member Mali 41867 Posted February 23, 2021 Author Honorable Member Share Posted February 23, 2021 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. 1 2 Link to comment Share on other sites More sharing options...
Aioria 10 Posted February 23, 2021 Share Posted February 23, 2021 (edited) 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 February 23, 2021 by Aioria Link to comment Share on other sites More sharing options...
Honorable Member Mali 41867 Posted February 23, 2021 Author Honorable Member Share Posted February 23, 2021 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. 1 Link to comment Share on other sites More sharing options...
Aioria 10 Posted February 23, 2021 Share Posted February 23, 2021 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 comment Share on other sites More sharing options...
Honorable Member Mali 41867 Posted February 23, 2021 Author Honorable Member Share Posted February 23, 2021 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. 1 Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10274 Posted February 23, 2021 Forum Moderator Share Posted February 23, 2021 (edited) 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 Sign In or Sign Up Srcs/Client/UserInterface/Locale_Inc.h #define BL_OFFLINE_MESSAGE Thanks for the release! @Mali61 Edited October 7, 2021 by VegaS™ 16 3 9 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Aioria 10 Posted February 23, 2021 Share Posted February 23, 2021 Thank you Vegas, you guys are fucking awesome °L° i'll try it as soon as i get home Link to comment Share on other sites More sharing options...
Honorable Member Mali 41867 Posted February 23, 2021 Author Honorable Member Share Posted February 23, 2021 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. 4 Link to comment Share on other sites More sharing options...
Aioria 10 Posted February 23, 2021 Share Posted February 23, 2021 (edited) Anyway i'm trying to add this but i got an error when compiling with "duplicate case": HEADER_GD_SHOP_NAME HEADER_GD_SHOP_CLOSE HEADER_GD_REQUEST_OFFLINE_MESSAGES HEADER_GD_SEND_OFFLINE_MESSAGE how to solve? Edited February 23, 2021 by Aioria Link to comment Share on other sites More sharing options...
Forum Moderator VegaS™ 10274 Posted February 23, 2021 Forum Moderator Share Posted February 23, 2021 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. 1 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Aioria 10 Posted February 23, 2021 Share Posted February 23, 2021 (edited) Thank you Vegas y.y Sorry i'm very noob, anyway i got this error now: ----------------------------- 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 February 24, 2021 by Aioria Link to comment Share on other sites More sharing options...
Active+ Member Reached 508 Posted February 25, 2021 Active+ Member Share Posted February 25, 2021 Thnx for release, btw they still steal xd. 1 Link to comment Share on other sites More sharing options...
Neverr 59 Posted March 3, 2021 Share Posted March 3, 2021 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 comment Share on other sites More sharing options...
HUNgarocel1 196 Posted March 5, 2021 Share Posted March 5, 2021 (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: ----------------------------- 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.. Edited March 5, 2021 by HUNgarocel1 2 Link to comment Share on other sites More sharing options...
VqLx 9 Posted November 2, 2021 Share Posted November 2, 2021 everything works. 5h is the limit, can I set e.g. 7 days? Link to comment Share on other sites More sharing options...
EAkar 8 Posted March 22, 2022 Share Posted March 22, 2022 On 02.11.2021 at 10:49, VqLx said: herşey çalışıyor. 5 saat sınırdır, örneğin 7 gün ayarlayabilir miyim? void CClientManager::OfflineMessageGarbage() { if (m_OfflineMessage.empty()) return; static const/*expr*/ int iHour = 5; Link to comment Share on other sites More sharing options...
Recommended Posts