aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Chat/Channels
diff options
context:
space:
mode:
authorsilinoron <none@none>2010-08-23 19:56:47 -0700
committersilinoron <none@none>2010-08-23 19:56:47 -0700
commit8649bee17fdd477623465a0ef22abe4d80b74fc3 (patch)
treef652ac8f180d88345cfd5ecdc779b4296d154189 /src/server/game/Chat/Channels
parentb30800e9bcc38faf4bcbe443240a6d0797ad88e5 (diff)
Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit. --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Chat/Channels')
-rw-r--r--src/server/game/Chat/Channels/Channel.cpp16
-rw-r--r--src/server/game/Chat/Channels/ChannelMgr.cpp2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/server/game/Chat/Channels/Channel.cpp b/src/server/game/Chat/Channels/Channel.cpp
index e191fff8bbf..01e2e56f772 100644
--- a/src/server/game/Chat/Channels/Channel.cpp
+++ b/src/server/game/Chat/Channels/Channel.cpp
@@ -161,7 +161,7 @@ void Channel::Join(uint64 p, const char *pass)
if (plr)
{
if (HasFlag(CHANNEL_FLAG_LFG) &&
- sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER && plr->GetGroup())
+ sWorld.getBoolConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER && plr->GetGroup())
{
MakeNotInLfg(&data);
SendToOne(&data, p);
@@ -171,7 +171,7 @@ void Channel::Join(uint64 p, const char *pass)
plr->JoinedChannel(this);
}
- if (m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
+ if (m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
{
MakeJoined(&data, p);
SendToAll(&data);
@@ -231,7 +231,7 @@ void Channel::Leave(uint64 p, bool send)
bool changeowner = players[p].IsOwner();
players.erase(p);
- if (m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
+ if (m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getBoolConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL)))
{
WorldPacket data;
MakeLeft(&data, p);
@@ -439,7 +439,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
// allow make moderator from another team only if both is GMs
// at this moment this only way to show channel post for GM from another team
if ((plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || newp->GetSession()->GetSecurity() < SEC_GAMEMASTER) &&
- plr->GetTeam() != newp->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ plr->GetTeam() != newp->GetTeam() && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakePlayerNotFound(&data, p2n);
@@ -495,7 +495,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
return;
}
- if (newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (newp->GetTeam() != plr->GetTeam() && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakePlayerNotFound(&data, newname);
@@ -543,7 +543,7 @@ void Channel::List(Player* player)
size_t pos = data.wpos();
data << uint32(0); // size of list, placeholder
- uint32 gmLevelInWhoList = sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
+ uint32 gmLevelInWhoList = sWorld.getIntConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
uint32 count = 0;
for (PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
@@ -640,7 +640,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
{
if (!what)
return;
- if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
lang = LANG_UNIVERSAL;
uint32 sec = 0;
@@ -716,7 +716,7 @@ void Channel::Invite(uint64 p, const char *newname)
if (!plr)
return;
- if (newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (newp->GetTeam() != plr->GetTeam() && !sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakeInviteWrongFaction(&data);
diff --git a/src/server/game/Chat/Channels/ChannelMgr.cpp b/src/server/game/Chat/Channels/ChannelMgr.cpp
index b72a2698d3a..6460cd4fdc0 100644
--- a/src/server/game/Chat/Channels/ChannelMgr.cpp
+++ b/src/server/game/Chat/Channels/ChannelMgr.cpp
@@ -22,7 +22,7 @@
ChannelMgr* channelMgr(uint32 team)
{
- if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
+ if (sWorld.getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance(); // cross-faction
if (team == ALLIANCE)