aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level3.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Level3.cpp')
-rw-r--r--src/game/Level3.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/game/Level3.cpp b/src/game/Level3.cpp
index 0d56d12a816..e1e67ce99ad 100644
--- a/src/game/Level3.cpp
+++ b/src/game/Level3.cpp
@@ -7234,6 +7234,30 @@ bool ChatHandler::HandleModifyGenderCommand(const char *args)
return true;
}
+bool ChatHandler::HandleChannelSetPublic(const char *args)
+{
+ if(!*args)
+ return false;
+ std::string channel = strtok((char*)args, " ");
+ uint32 val = atoi((char*)args);
+
+ if(val)
+ {
+ CharacterDatabase.PExecute("UPDATE channels SET m_public = 1 WHERE n_name LIKE '%s'", channel);
+ val = 1;
+ }
+ else
+ {
+ CharacterDatabase.PExecute("UPDATE channels SET m_public = 0 WHERE n_name LIKE '%s'", channel);
+ val = 0;
+ }
+
+ PSendSysMessage(LANG_CHANNEL_PUBLIC_CHANGED, channel.c_str(), val);
+
+ return true;
+}
+
+
/*------------------------------------------
*-------------TRINITY----------------------
*-------------------------------------*/