summaryrefslogtreecommitdiff
path: root/tracker/AdminServer/cmdlist.h
blob: 1566e7dc36b193e318960a9c6f127e986ba4c19e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================

#ifndef CMDLIST_H
#define CMDLIST_H
#ifdef _WIN32
#pragma once
#endif

#include "server.h"
#include "netadr.h"
#include "maps.h"
#include "rcon.h"
#include "utlvector.h"
#include "Iresponse.h"

class CSocket;
class IResponse;

class CCMDList: public IResponse 
{
public:

	CCMDList(IResponse *target,serveritem_t &server, const char *rconPassword);
	~CCMDList();

	serveritem_t &GetServer();
	void RunFrame();
	bool QueryCommand(char *cmd);
	bool GotCommands();

	void SetPassword(const char *newPass);

	virtual void ServerResponded();
	virtual void ServerFailedToRespond();


private:

	serveritem_t m_Server;
	CUtlVector<char *> m_CMDList;
	IResponse *m_pResponseTarget;

	CRcon *m_pRcon;

	bool m_bGotCommands;
	char m_szRconPassword[100];

};


#endif // CMDLIST_H