ryzom / ryzomcore

Ryzom Core is the open-source project related to the Ryzom game. This community repository is synchronized with the Ryzom Forge repository, based on the Core branch.
https://wiki.ryzom.dev
GNU Affero General Public License v3.0
331 stars 89 forks source link

/muteUniverse on dyn universe channels #143

Closed ryzom-pipeline closed 9 years ago

ryzom-pipeline commented 10 years ago

Original report by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


I believe there is a bug in /muteUniverse command.

#!c++

--- a/code/ryzom/server/src/input_output_service/chat_manager.cpp
+++ b/code/ryzom/server/src/input_output_service/chat_manager.cpp
@@ -639,9 +639,9 @@
                                        // If universal channel check if player muted
                                        if (session->getChan()->UniversalChannel)
                                        {
-                                               if(_MutedUsers.find( eid ) != _MutedUsers.end())
+                                               if(_MutedUniverseUsers.find( eid ) != _MutedUniverseUsers.end())
                                                {
-                                                       nldebug("IOSCM:  chat The player %s:%x is muted",
+                                                       nldebug("IOSCM:  chat The player %s:%x is universe muted",
                                                                TheDataset.getEntityId(sender).toString().c_str(),
                                                                sender.getIndex());
                                                        return;
ryzom-pipeline commented 9 years ago

Original comment by Jan Boon (Bitbucket: [Jan Boon](https://bitbucket.org/Jan Boon), ).


What does this change?

ryzom-pipeline commented 9 years ago

Original comment by Meelis Mägi (Bitbucket: [Meelis Mägi](https://bitbucket.org/Meelis Mägi), ).


That change will probably prevent players that are muted with /muteUniverse command, also talk to dyn channels marked as universal (faction, lang)... probably.

If you check the function, then _MutedUsers is already checked at start and ChatGroup::universe is checking _MutedUniverseUsers, so my only conclusion it that there is a typo.

ryzom-pipeline commented 9 years ago

Original comment by Jan Boon (Bitbucket: [Jan Boon](https://bitbucket.org/Jan Boon), ).


Yup, okay, looks like it.

ryzom-pipeline commented 9 years ago

Original comment by Jan Boon (Bitbucket: [Jan Boon](https://bitbucket.org/Jan Boon), ).


Fix #143 /muteUniverse on dyn universe channels