aboutsummaryrefslogtreecommitdiffstats
path: root/src/MessageCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-04-17 22:58:33 +0200
committerMax Kellermann <max@duempel.org>2013-04-17 23:52:58 +0200
commitb2d3d15e978aef2566a1bdae435d71cb326dec4d (patch)
tree769550ce5e624915b9d3129793624583474604ba /src/MessageCommands.cxx
parent08dfd263ba496b0c1f6ddbe9b3eefa9a5cea57a4 (diff)
downloadmpd-b2d3d15e978aef2566a1bdae435d71cb326dec4d.tar.gz
mpd-b2d3d15e978aef2566a1bdae435d71cb326dec4d.tar.xz
mpd-b2d3d15e978aef2566a1bdae435d71cb326dec4d.zip
Main: move global variables to struct Instance
More preparations for multi-player support.
Diffstat (limited to 'src/MessageCommands.cxx')
-rw-r--r--src/MessageCommands.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/MessageCommands.cxx b/src/MessageCommands.cxx
index f19a1b5d4..4e24a1828 100644
--- a/src/MessageCommands.cxx
+++ b/src/MessageCommands.cxx
@@ -22,6 +22,7 @@
#include "ClientSubscribe.hxx"
#include "ClientInternal.hxx"
#include "ClientList.hxx"
+#include "Instance.hxx"
#include "Main.hxx"
#include "protocol/Result.hxx"
#include "protocol/ArgParser.hxx"
@@ -81,7 +82,7 @@ handle_channels(Client *client,
assert(argc == 1);
std::set<std::string> channels;
- for (const auto &c : *client_list)
+ for (const auto &c : *instance->client_list)
channels.insert(c->subscriptions.begin(),
c->subscriptions.end());
@@ -122,7 +123,7 @@ handle_send_message(Client *client,
bool sent = false;
const ClientMessage msg(argv[1], argv[2]);
- for (const auto &c : *client_list)
+ for (const auto &c : *instance->client_list)
if (client_push_message(c, msg))
sent = true;