forked from Wirlaburla/P3NG0
initial client header
This commit is contained in:
parent
2152441358
commit
e188d455d7
35
src/client.h
35
src/client.h
|
@ -9,7 +9,7 @@
|
||||||
#include "acfile.h"
|
#include "acfile.h"
|
||||||
#define BUFFERSIZE 4096
|
#define BUFFERSIZE 4096
|
||||||
|
|
||||||
bool debug = false;
|
bool debug = true;
|
||||||
std::random_device rd;
|
std::random_device rd;
|
||||||
std::mt19937 rng(rd());
|
std::mt19937 rng(rd());
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ const std::string user_agent = "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.
|
||||||
std::string confFile = "conf/bot.conf";
|
std::string confFile = "conf/bot.conf";
|
||||||
ACFile* mainConf;
|
ACFile* mainConf;
|
||||||
ACFile* worldlist;
|
ACFile* worldlist;
|
||||||
|
ACFile* marksLUT;
|
||||||
ACFile* replylist;
|
ACFile* replylist;
|
||||||
AMFile* messages;
|
AMFile* messages;
|
||||||
ALFile* filth;
|
ALFile* filth;
|
||||||
|
@ -49,7 +50,7 @@ uint16_t roomport = 5672;
|
||||||
|
|
||||||
std::string login_username;
|
std::string login_username;
|
||||||
std::string login_password;
|
std::string login_password;
|
||||||
std::string avatar = "avatar:pengo.mov";
|
std::string avatar = "http://files.worlio.com/users/bonkmaykr/avatarsforme/gabu1s*4h*4v*.mov";
|
||||||
|
|
||||||
// Needs to include dimension too
|
// Needs to include dimension too
|
||||||
std::string room;
|
std::string room;
|
||||||
|
@ -57,7 +58,7 @@ uint16_t roomID = 1;
|
||||||
|
|
||||||
int protocol = 24;
|
int protocol = 24;
|
||||||
char* version = "1000000000";
|
char* version = "1000000000";
|
||||||
int avatars = 253;
|
int avatars = 253; // avoid culling users if possible... what could go wrong?
|
||||||
int keepAliveTime;
|
int keepAliveTime;
|
||||||
|
|
||||||
uint16_t xPos = 0;
|
uint16_t xPos = 0;
|
||||||
|
@ -70,6 +71,30 @@ std::map<char, char*> properties;
|
||||||
std::map<char, Drone*> objects;
|
std::map<char, Drone*> objects;
|
||||||
std::vector<Group> groups;
|
std::vector<Group> groups;
|
||||||
|
|
||||||
|
namespace internalTypes {
|
||||||
|
struct dronePositionI {
|
||||||
|
int x;
|
||||||
|
int y;
|
||||||
|
int z;
|
||||||
|
int yaw;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct dronePositionF {
|
||||||
|
float x;
|
||||||
|
float y;
|
||||||
|
float z;
|
||||||
|
float yaw;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct markEntry {
|
||||||
|
std::string name;
|
||||||
|
std::string url;
|
||||||
|
std::string room;
|
||||||
|
dronePositionI position;
|
||||||
|
bool blacklist;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
void loadConfig();
|
void loadConfig();
|
||||||
int deinit(int response);
|
int deinit(int response);
|
||||||
void autoInit();
|
void autoInit();
|
||||||
|
@ -101,6 +126,10 @@ void sendGroupMessage(Group* g, int *sock, std::string message);
|
||||||
void safeDeleteGroupMember(Group* g, std::string member);
|
void safeDeleteGroupMember(Group* g, std::string member);
|
||||||
void qsend(int *sock, unsigned char str[], bool queue);
|
void qsend(int *sock, unsigned char str[], bool queue);
|
||||||
|
|
||||||
|
void handleTeleportRequest(internalTypes::markEntry details);
|
||||||
|
void handleTour(std::string destination[4]);
|
||||||
|
void lookUpWorldName(std::string alias, char* buffer);
|
||||||
|
|
||||||
Drone* getDrone(std::string name) {
|
Drone* getDrone(std::string name) {
|
||||||
for (auto o : objects)
|
for (auto o : objects)
|
||||||
if (o.second->name == name) return o.second;
|
if (o.second->name == name) return o.second;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user