All pastes #773463 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-14 15:43 UTC
rendered paste body
Player Unable to join if leaved.
+        void LeftChannel(std::string name)
+        {
+            if(!name.compare("Battleground"))
+                MaNGOS::Singleton<AllianceChannelMgr>::Instance().LeftChannel(name);
+            ChannelMgr::LeftChannel(name);
+        }





Suggested by unknown-terror (comment: a void function can't return a value... with that before)
+        void LeftChannel(std::string name)
+        {
+            if(!name.compare("Battleground"))
+                return MaNGOS::Singleton<AllianceChannelMgr>::Instance().LeftChannel(name);
+            ChannelMgr::LeftChannel(name);
+        }





Suggested by nafe (comment: You seem to have forgotten about the return in the if.)
+        void LeftChannel(std::string name)
+        {
+            if(!name.compare("Battleground"))
+                MaNGOS::Singleton<AllianceChannelMgr>::Instance().LeftChannel(name);
+            ChannelMgr::LeftChannel(name);
+        }