]> git.sesse.net Git - ultimatescore/commitdiff
Remove some fluff from the ACMP era.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 15 Oct 2018 07:03:26 +0000 (09:03 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 15 Oct 2018 07:03:26 +0000 (09:03 +0200)
client/ws_server.cpp
client/ws_server.h

index 914da3877e98fdfdfaeaa7d6b9014dedd24ef14c..dff0c0da5aace2d0ba7fd818b8c4d80d63ee73ae 100644 (file)
@@ -34,11 +34,6 @@ void WSServer::change_port(int port)
        ws_server->listen(QHostAddress::Any, port);
 }
 
-void WSServer::add_init_command(const string &cmd)
-{
-       init_commands.push_back(cmd + "\r\n");
-}
-
 void WSServer::set_connection_callback(const std::function<void(bool)> &callback)
 {
        connection_callback = callback;
@@ -56,9 +51,6 @@ void WSServer::on_new_connection()
        QWebSocket *sock = ws_server->nextPendingConnection();
        connect(sock, &QWebSocket::disconnected, this, &WSServer::disconnected);
 
-       for (const string &cmd : init_commands) {
-               sock->sendTextMessage(QString::fromStdString(cmd));
-       }
        clients.insert(sock);
        connection_callback(true);
 }
index 17d13094433a3169ad8b2b40a71878354fb5101c..1b909f74da9d68070c508dcd0d32ff51c1468cd9 100644 (file)
@@ -19,7 +19,6 @@ class WSServer : public QObject {
 public:
        WSServer(const std::string &host, int port);
 
-       void add_init_command(const std::string &cmd);
        void set_connection_callback(const std::function<void(bool)> &callback);
        void send_command(const std::string &cmd);
        void change_port(int port);
@@ -31,7 +30,6 @@ private slots:
 private:
        void thread_func();
 
-       std::vector<std::string> init_commands;
        std::function<void(bool)> connection_callback;
 
        QWebSocketServer *ws_server;