待辦事項 #41028

Private chat mode + various chat patches

啟用日期: 2020-12-05 10:15 最後更新: 2021-06-21 05:05

回報者:
負責人:
(無)
類型:
狀態:
關閉
元件:
(無)
里程碑:
(無)
優先權:
5 - 中
嚴重程度:
5 - 中
處理結果:
Accepted
檔案:
7

細節

This addresses following Zandronum ticket: https://zandronum.com/tracker/view.php?id=354

The following patches adds a new chat mode enabling players to send private messages to each other without other players seeing them, but the server can still see the messages in the chat log. This is done through two console commands: "sayto" (accepts player names) and "sayto_idx" (accepts player numbers), much like in ZDaemon. Let's assume Player #1 sends a private message to Player #2:

1. Player #1 will see: "<To Player #2>: message". 2. Player #2 will see: "<From Player #1>: message". 3. If the server sent a private message to either player, they will see: "<From Server>: message". 4. "/me" commands are also handled accordingly like in other chat modes.

For private messaging to work, there must be another player to send a message to, a player cannot send a private message to themselves. Also, if LMS spectator settings are in effect, a message will only be printed on the screen indicating if this particular player will not see or be able to chat back with us. Private messages are printed on a new message level that's one above team chat messages, and also use a custom sound (the Doom 1 chat sound by default) and text color (cyan by default), both of which can be changed by the client through the console or menus.

I made sure to comment wherever necessary, especially in spots that require (G)ZDoom delta, and I tried testing this both offline and online to make sure it works as intended.

Ticket History (3/32 Histories)

2020-12-05 10:15 Updated by: akmdm
  • New Ticket "Private chat mode" created
2020-12-05 10:16 Updated by: akmdm
  • File private_chat.patch (File ID: 5754) is attached
2020-12-05 10:18 Updated by: akmdm
  • Details Updated
評語
(This comment has been deleted)
2020-12-06 20:54 Updated by: akmdm
評語

I want to make some changes to the patches, I'll resubmit them in a few hours.

EDIT: I resubmitted private_chat.patch. Now clients can send private messages to the server and only private messages to/from the server are logged in the server's chat log. Private chat messages between two players won't be logged.

chat_sound.patch is dependent on private_chat.patch.

EDIT 2: I submitted another patch that fixes a small issue with the private messages.

(Edited, 2020-12-07 05:26 Updated by: akmdm)
2020-12-07 04:56 Updated by: akmdm
  • File private_chat.patch (File ID: 5754) is deleted
2020-12-07 04:56 Updated by: akmdm
  • File private_chat.patch (File ID: 5758) is attached
2020-12-07 05:25 Updated by: akmdm
  • File 11358.patch (File ID: 5760) is attached
2020-12-07 06:14 Updated by: torr_samaho
評語

Thanks for the patch! Sounds like a very useful feature.

I started to look at the code in detail and noticed that it would simplify things a lot if I could leave comments directly in the code, like we used to in merge requests on bitbucket. Do you know if OSDN supports this? If not, it would be great if we find a different platform where this is possible.

2020-12-07 06:32 Updated by: akmdm
評語

Reply To torr_samaho

Thanks for the patch! Sounds like a very useful feature. I started to look at the code in detail and noticed that it would simplify things a lot if I could leave comments directly in the code, like we used to in merge requests on bitbucket. Do you know if OSDN supports this? If not, it would be great if we find a different platform where this is possible.

I don't think OSDN has this feature, but I could be wrong.

(Edited, 2020-12-07 06:42 Updated by: akmdm)
2020-12-07 06:53 Updated by: torr_samaho
評語

I think so too. Are you familiar with the hg-git bridge? https://hg-git.github.io/

You could just create a git mirror of your hg repository and we use github for the code commenting.

2020-12-07 07:04 Updated by: None
評語

Reply To torr_samaho

I think so too. Are you familiar with the hg-git bridge? https://hg-git.github.io/ You could just create a git mirror of your hg repository and we use github for the code commenting.

I'll take look at this plugin you sent me, I can create a mirror on my GitHub account and we can go forward from there. This would be extremely useful for the larger commits/changes that require more review. Thanks for the suggestion.

2020-12-10 06:53 Updated by: akmdm
評語

I created a mirror of "zandronum-stable" on my GitHub account, you can access the commit for the private messaging here: https://github.com/AKMDM/Zandronum/commit/6b2c688e07102a2ca16cc40bdb040b9bcbf8855c

(Edited, 2020-12-13 04:16 Updated by: akmdm)
2020-12-14 00:06 Updated by: akmdm
  • File 11358.patch (File ID: 5760) is deleted
2020-12-14 00:06 Updated by: akmdm
  • File private_chat.patch (File ID: 5758) is deleted
2020-12-14 06:15 Updated by: torr_samaho
評語

Thanks for the GitHub mirror and the updated patch! Is the updated patch already on GitHub? At least the time stamp of the new patch in the ticket is two days newer then the GitHub commit you linked further up?

2020-12-14 06:22 Updated by: akmdm
評語

Reply To torr_samaho

Thanks for the GitHub mirror and the updated patch! Is the updated patch already on GitHub? At least the time stamp of the new patch in the ticket is two days newer then the GitHub commit you linked further up?

It's the same one only that I uploaded it here late.

2020-12-19 13:11 Updated by: akmdm
評語

I added some new patches to complement further changes or fixes to the chat and console.

EDIT: Here's a link to the commit which adds the new EVENT type on my GitHub repo: https://github.com/AKMDM/Zandronum/commit/ce07f2bdab0c2777d7b3977915c2b1da68a0f8aa

(Edited, 2020-12-20 22:23 Updated by: akmdm)
2020-12-21 05:54 Updated by: torr_samaho
評語

I added 10234.patch, 10235.patch and 10238.patch.

The other two new patches are meant to refine the private chat patch, right? I'll have to look at their union then.

2020-12-21 14:28 Updated by: akmdm
  • 類型 Update from 問題回報 to 修補檔案
2020-12-26 12:47 Updated by: akmdm
  • Summary Updated
2020-12-26 12:49 Updated by: akmdm
評語

Reply To torr_samaho

The other two new patches are meant to refine the private chat patch, right? I'll have to look at their union then.

That's correct. 10237.patch particularly fixes a compiler warning caused by the introduction of private_chat_mode.patch.

EDIT: Sorry to ask this, but could 10236.patch be ignored for the time being? After some thought, I'm not sure how useful the new EVENT type and ACS function would really be to modders, and I think the way I implemented it isn't too great either. I would much rather replace this patch with something better.

(Edited, 2020-12-27 23:12 Updated by: akmdm)
2020-12-28 06:30 Updated by: torr_samaho
  • 類型 Update from 修補檔案 to 問題回報
評語

EDIT: Sorry to ask this, but could 10236.patch be ignored for the time being? After some thought, I'm not sure how useful the new EVENT type and ACS function would really be to modders, and I think the way I implemented it isn't too great either. I would much rather replace this patch with something better.

No problem.

To further simplify the review, can you convert this into a pull request for https://github.com/TorrSamaho/zandronum ? Then, we can do the review and handle all possibly adjustments within one GitHub pull request. That should be much simpler then continuously posting new patch files which are refining or replacing existing patch files.

2020-12-28 06:36 Updated by: akmdm
評語

Reply To torr_samaho

To further simplify the review, can you convert this into a pull request for https://github.com/TorrSamaho/zandronum ? Then, we can do the review and handle all possibly adjustments within one GitHub pull request. That should be much simpler then continuously posting new patch files which are refining or replacing existing patch files.

Sure, I will do that as soon as possible.

EDIT: Here's the pull request: https://github.com/TorrSamaho/zandronum/pull/1

(Edited, 2020-12-28 14:08 Updated by: akmdm)
2021-06-21 05:05 Updated by: torr_samaho
評語

Has been taken care by now.

2021-06-21 05:05 Updated by: torr_samaho
  • 狀態 Update from 開啟 to 關閉
  • 處理結果 Update from to Accepted

Attachment File List

編輯

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » 登入