| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 | 
							- #ifndef CLIENT_H
 
- #define CLIENT_H
 
- #include "QWClient.h"
 
- #include <QString>
 
- #include <QStringList>
 
- #include <QList>
 
- #include <QTime>
 
- #include "ServerQuery.h"
 
- class App;
 
- class QTime;
 
- class QTimer;
 
- class ActiveClient;
 
- class Client : public QWClient
 
- {
 
- public:
 
-   Client(App* app, ActiveClient* ac);
 
-   ~Client();
 
-   void connect(const char *host, quint16 port);
 
-   void run();
 
-   void disconnect();
 
-   void say(const QString& msg);
 
- 	void sayTeam(const QString& msg);
 
-   void setTeam(const QString& msg);
 
- 	void setSocket(class QTcpSocket* socket);
 
-   void retryConnection(); //unused
 
-   bool isOnServer() const;
 
-   bool isQWMuted() const;
 
-   bool isSpamMuted() const;
 
-   void setPlayerList(PlayerList &playerList);
 
- protected:
 
- 	void onLevelChanged(int playerNum, const char *levelName, float gravity, float stopSpeed, float maxSpeed, float spectatorMaxSpeed, float accelerate, float airAccelerate, float waterAccelerate, float friction, float waterFriction, float entGravity);
 
- 	void onDisconnect();
 
- 	void onPrint(int level, const char *msg);
 
- 	void onChallenge();
 
- 	void onConnection();
 
- 	void onConnected();
 
- 	void onDownloadStarted(const char *fileName);
 
- 	void onDownloadFinished();
 
- 	void onDownloadProgress(int percent);
 
- 	void onStuffedCmd(const char *cmd);
 
- 	void onError(const char *description);
 
- 	void onOOBPrint(const char *msg);
 
- private:
 
-   ActiveClient*     myActiveClient;
 
- 	App*							myApp;
 
-   QTime             myEndFloodTime;
 
- 	bool							myFloodMsgPrinted;
 
- 	int								myConnectionRetries;
 
- 	static const int	ConnectionRetries = 10;
 
- 	QString						myPrintLine;
 
- 	bool							myDownloadProgressPrintedFlag;
 
-   bool              myOnServerFlag;
 
-   bool              mySpamMutedFlag;
 
-   bool              myQWMutedFlag;
 
-   QTimer*           myJoinMessageTimer;
 
-   QTime             myQWBroadcastFloodTime;
 
-   QTime             mySpamBroadcastFloodTime;
 
-   bool              myJoinMessagePrinted;
 
-   bool              myJoinMessageScheduled;
 
-   PlayerList        myPlayerList;
 
-   void print(const QString& msg);
 
- 	void parsePrintedLine();
 
-   static QString parseNameFun(const QString& string);
 
- };
 
- #endif // CLIENT_H
 
 
  |