From b2d3d15e978aef2566a1bdae435d71cb326dec4d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 17 Apr 2013 22:58:33 +0200 Subject: Main: move global variables to struct Instance More preparations for multi-player support. --- src/MessageCommands.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/MessageCommands.cxx') 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 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; -- cgit v1.2.3