28 #include "../eve-common/EVEVersion.h"
29 #include "../eve-common/EVE_Character.h"
82 m_destinyEventQueue(new
PyList()),
83 m_destinyUpdateQueue(new
PyList()),
84 m_nextNotifySequence(0)
237 cur->LeaveChannel(
this);
319 sLog.Error(
"Client::SelectCharacter()",
"Char %u already online.", charID);
320 SendErrorMsg(
"That Character is already online. Selection Failed.");
327 sLog.Error(
"Client::SelectCharacter()",
"Failed to init session for char %u.", charID);
328 SendErrorMsg(
"Unable to Initalize Character session. Selection Failed.");
346 sLog.Error(
"Client::SelectCharacter()",
"GetChar for %u = nullptr", charID);
347 SendErrorMsg(
"Unable to locate Character. Selection Failed.");
365 sLog.Error(
"Client::SelectCharacter()",
"shipID %u invalid for %u. Selecting new ship...",
m_shipId, charID);
369 sLog.Error(
"Client::SelectCharacter()",
"shipID %u for %u also invalid. Loading Pod.",
m_shipId, charID);
387 if (
sConfig.server.NoobShipCheck) {
389 if (sRef.
get() ==
nullptr) {
391 }
else if (!sRef->
HasShip(
this)) {
468 _log(CLIENT__TIMER,
"ProcessClient()::IsDocked()::CheckState(): case: Login");
472 _log(CLIENT__TIMER,
"ProcessClient()::IsDocked()::CheckState(): case: Idle");
475 _log(CLIENT__TIMER,
"ProcessClient()::IsDocked()::CheckState(): case: Logout");
478 _log(CLIENT__TIMER,
"ProcessClient()::IsDocked()::CheckState(): case: Killed");
482 _log(AUTOPILOT__TRACE,
"ProcessClient()::IsDocked() - m_clientState set to Idle");
484 if (
sConfig.debug.UseProfiling)
538 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Idle");
542 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Dock");
546 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Undock");
552 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Killed");
558 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Board");
565 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Login");
572 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Jump");
576 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: DriveJump");
580 _log(CLIENT__TIMER,
"ProcessClient()::CheckState(): case: Logout");
598 if ((sData.
leader !=
nullptr) and (sData.
booster !=
nullptr))
604 if ((wData.
leader !=
nullptr) and (wData.
booster !=
nullptr))
610 if ((fData.
leader !=
nullptr) and (fData.
booster !=
nullptr))
624 if (
sConfig.debug.UseProfiling)
648 sLog.Blue(
"Client::WarpOut()",
"Client Destructor for %s(%u) called WarpOut(). Finish code here.",
GetName(),
m_char->
itemID());
676 _log(AUTOPILOT__MESSAGE,
"%s called SetAutoPilot to %s",
GetName(), (set ?
"true" :
"false"));
686 if (!
sDataMgr.IsStation(locationID) and !
sDataMgr.IsSolarSystem(locationID)) {
687 SendErrorMsg(
"Move requested to unsupported location %u", locationID);
691 _log(AUTOPILOT__TRACE,
"MoveToLocation() - m_autoPilot = %s", (
m_autoPilot ?
"true" :
"false"));
694 _log(PLAYER__WARNING,
"MoveToLocation() - m_locationID == location");
711 _log(PLAYER__WARNING,
"MoveToLocation() - current m_system is %s, systemData is for %s, m_system->GetID(%u) != locationID(%u)", \
729 _log(PLAYER__WARNING,
"MoveToLocation() - m_system == NULL, m_locationID = %u", m_locationID);
736 SendErrorMsg(
"Unable to boot system. Relog and try again.");
767 if (
sDataMgr.IsStation(m_locationID)) {
781 squad.emplace(squad.end(),
m_squad);
783 wing.emplace(wing.end(),
m_wing);
794 if (sRef.
get() !=
nullptr) {
800 _log(PLAYER__WARNING,
"MoveToLocation() - Character %s(%u) InSpace in %u. (setState %s, beyonce %s)", \
815 squad.emplace(squad.end(),
m_squad);
817 wing.emplace(wing.end(),
m_wing);
840 uint32 stationID(
sDataMgr.IsStation(m_locationID) ? m_locationID : 0);
855 bool updateShip =
false;
864 _log(PLAYER__AP_TRACE,
"Client::SetDestiny(): shipSystemID: %u, SystemID: %u, update: %s, updateShip: %s, jump: %s, cloak: %s", \
888 _log(PLAYER__AP_TRACE,
"Client::SetBallPark(): State: %s, SetState: %s, Beyonce: %s", \
915 sLog.Error(
"CheckBallparkTimer()",
"BallPark Timer is disabled.");
920 _log(CLIENT__TIMER,
"CheckBallparkTimer(): State: %s, SetState: %s, Beyonce: %s, Login: %s", \
923 _log(CLIENT__TIMER,
"CheckBallparkTimer(): invul: %s, cloak: %s, bubblewait: %s",
m_invul?
"true":
"false", \
948 _log(AUTOPILOT__TRACE,
"DockToStation()() - m_clientState set to Idle");
956 if (
sConfig.server.NoobShipCheck) {
958 if (sRef.
get() ==
nullptr) {
959 _log(CLIENT__ERROR,
"%s(%u): DockToStation() - Station %u not found in inventory of %s(%u).", \
961 }
else if (!sRef->
HasShip(
this)) {
976 if (
m_TS !=
nullptr) {
1051 if (newShipRef.
get() ==
nullptr) {
1052 _log(PLAYER__ERROR,
"CheckShipRef() - %s: newShipRef == NULL.",
m_char->
name());
1053 throw CustomError (
"Could not find ship's ItemRef. Cannot Board. Ref: ServerError 12321.");
1055 _log(PLAYER__MESSAGE,
"%s tried to board ship %u, which is not assembled.",
m_char->
name(), newShipRef->
itemID());
1056 throw CustomError (
"You cannot board a ship which is not assembled!");
1059 _log(PLAYER__MESSAGE,
"%s tried to board active ship %u.",
m_char->
name(), newShipRef->
itemID());
1060 throw CustomError (
"You are already aboard this ship.");
1069 _log(PLAYER__MESSAGE,
"%s boarding active ship %u on login.",
m_char->
name(), newShipRef->
itemID());
1103 bool abandoned =
true;
1139 _log(SHIP__ERROR,
"Handle_Eject() - Failed to get podItem for %s.",
GetName());
1141 throw CustomError (
"Something bad happened as you prepared to eject. Ref: ServerError 25107.");
1148 _log(SHIP__ERROR,
"Handle_Eject() - Bubble is null for %s.",
GetName());
1150 throw CustomError (
"Something bad happened as you prepared to eject. Ref: ServerError 25107+1.");
1157 bool abandoned =
true;
1191 if (newShipSE ==
nullptr) {
1195 throw CustomError (
"There was a problem creating your pod in space.<br>You have been transfered to your home station.<br>Ref: ServerError 15107.");
1225 if (newShipSE ==
nullptr) {
1230 throw CustomError (
"There was a problem creating your pod in space.<br>You have been transfered to your home station.<br>Ref: ServerError 15107.");
1308 m_pod->ChangeSingleton(
true);
1317 using namespace Char;
1318 uint16 shipID(0), gunID(0);
1338 _log(CLIENT__ERROR,
"SpawnNewRookieShip() - Invalid Race of %s(%u) for %s(%u)",
1350 if (sRef.get() !=
nullptr) {
1352 sRef->ChangeSingleton(
true);
1358 if (mRef.get() !=
nullptr) {
1359 mRef->ChangeSingleton(
true);
1365 if (wRef.get() !=
nullptr) {
1366 wRef->ChangeSingleton(
true);
1372 if (cRef.get() !=
nullptr)
1412 sLog.Error(
"Client",
"%s: StargateJump called when a move is already pending. Ignoring.",
m_char->
name());
1428 if (!
sDataMgr.GetStaticInfo(toGate, toData)) {
1429 _log(DATA__ERROR,
"Failed to retrieve data for stargate %u", toGate);
1456 sLog.Error(
"Client",
"%s: CynoJump called when a move is already pending. Ignoring.",
m_char->
name());
1478 _log(AUTOPILOT__TRACE,
"ExecuteJump() - movePoint = null; state set to Idle");
1497 _log(AUTOPILOT__TRACE,
"ExecuteJump() - movePoint = null; state set to Idle");
1519 _log(CLIENT__TIMER,
"%s: Ballpark Timer Disabled",
m_char->
name());
1540 _log(CLIENT__TIMER,
"%s: Cloak Timer Disabled");
1564 _log(CLIENT__TIMER,
"%s: Uncloak Timer Disabled");
1584 _log(CLIENT__TIMER,
"%s: Invul Timer Disabled");
1603 _log(CLIENT__TIMER,
"%s: State Timer Disabled");
1613 _log(CLIENT__TIMER,
"%s: Client Timer set from %s to %s at %ums. current state time: %u",
m_char->
name(),
\
1661 std::map<uint32, bool>::const_iterator itr =
m_hangarLoaded.find(hangarID);
1668 _log(PLAYER__INFO,
"Client::LoadStationHangar() is loading personal hangar for %s(%u) in stationID %u",
m_char->
name(),
m_char->
itemID(), stationID);
1678 if (iRef.
get() ==
nullptr) {
1684 oldflag = iRef->
flag();
1686 iRef->
Move(location, flag,
true);
1694 _log(INV__WARNING,
"Client::MoveItem() - %s Unhandled PlayerItem %s (%u) from flag %s to flag %s.", \
1698 _log(INV__WARNING,
"Client::MoveItem() - %s Unhandled NonPlayerItem %s (%u) from flag %s to flag %s.", \
1705 std::map<uint32, uint32>::iterator itr =
m_lpMap.find(corpID);
1717 if (iRef.
get() !=
nullptr) {
1718 if (count < iRef->quantity()) {
1730 if (iRef.
get() !=
nullptr){
1731 if (count < iRef->quantity()) {
1751 if (iRef.
get() !=
nullptr)
1756 if (iRef.
get() !=
nullptr)
1816 OnCharNoLongerInStation ocnis;
1821 PyTuple* tmp = ocnis.Encode();
1824 std::vector<Client*> clients;
1827 for (
auto cur : clients) {
1829 cur->SendNotification(
"OnCharNoLongerInStation",
"stationid", &tmp);
1839 OnCharNowInStation ocnis;
1844 PyTuple* tmp = ocnis.Encode();
1845 std::vector<Client*> clients;
1848 for (
auto cur : clients) {
1850 cur->SendNotification(
"OnCharNowInStation",
"stationid", &tmp);
1861 sLog.Error(
"Client::InitSession()",
"characterID is not valid");
1865 std::map<std::string, int64> characterDataMap;
1867 if (characterDataMap.size() < 1) {
1868 sLog.Error(
"Client::InitSession()",
"characterDataMap.size() returned zero.");
1872 int32 stationID = (
int32)(characterDataMap[
"stationID"]);
1873 int32 solarSystemID = (
int32)(characterDataMap[
"solarSystemID"]);
1889 pSession->
SetInt(
"corpAccountKey", characterDataMap[
"corpAccountKey"]);
1892 if (characterDataMap[
"allianceID"] != 0){
1896 pSession->
SetInt(
"warfactionid", characterDataMap[
"warFactionID"]);
1908 if (
sDataMgr.IsStation(stationID)) {
1941 if (
sDataMgr.IsStation(stationID)) {
2009 SessionInitialState scn;
2010 scn.initialstate =
new PyDict();
2015 _log(CLIENT__SESSION,
"Session initialized. Sending initial session state");
2016 scn.initialstate->Dump(CLIENT__SESSION,
" Changes: ");
2023 packet->
type_string =
"macho.SessionInitialStateNotification";
2036 packet->
payload = scn.Encode();
2040 _log(CLIENT__SESSION_DUMP,
"Sending Session packet:");
2042 packet->
Dump(CLIENT__SESSION_DUMP, dumper);
2068 SessionChangeNotification scn;
2069 scn.changes =
new PyDict();
2072 if (scn.changes->empty())
2076 _log(CLIENT__SESSION,
"Session updated. Sending session change");
2077 scn.changes->Dump(CLIENT__SESSION,
" Changes: ");
2082 scn.nodesOfInterest.push_back(-1);
2090 packet->
type_string =
"macho.SessionChangeNotification";
2103 packet->
payload = scn.Encode();
2107 _log(CLIENT__SESSION_DUMP,
"Sending Session packet:");
2109 packet->
Dump(CLIENT__SESSION_DUMP, dumper);
2125 if ((event ==
nullptr) or ((*event) ==
nullptr))
2132 if ((update ==
nullptr) or ((*update) ==
nullptr))
2136 DoDestinyAction act;
2141 act.update = *update;
2151 act.update = pa.Encode();
2154 DoDestinyUpdateMain_2 dum;
2155 dum.updates =
new PyList();
2156 dum.updates->AddItem(act.Encode());
2160 t->
Dump(CLIENT__QUEUE_DUMP,
"");
2164 act.update = *update;
2173 DoDestinyUpdateMain_2 dum;
2178 t->
Dump(CLIENT__QUEUE_DUMP,
"");
2181 DoDestinyUpdateMain dum;
2187 t->
Dump(CLIENT__QUEUE_DUMP,
"");
2191 Notify_OnMultiEvent nom;
2195 t->
Dump(CLIENT__QUEUE_DUMP,
"");
2210 notify.
args = payload;
2226 if ((*payload) ==
nullptr)
2232 notify.
args = (*payload);
2255 packet->
dest = dest;
2268 PyLogDumpVisitor dumper(CLIENT__NOTIFY_DUMP, CLIENT__NOTIFY_REP,
"",
true,
true);
2269 packet->
Dump(CLIENT__NOTIFY_DUMP, dumper);
2281 SendNotifyMsg(
"You have been kicked from this server and will be disconnected shortly.");
2290 SendNotifyMsg(
"You have been banned from this server and will be disconnected shortly. You will no longer be able to log in");
2303 version.user_count =
sEntityList.GetClientCount();
2316 version.Dump(NET__PRES_REP,
" ");
2318 sLog.Error(
"Client",
"%s: Client's birthday does not match ours!",
GetAddress().c_str());
2320 sLog.Error(
"Client",
"%s: Client's macho_version not match ours!",
GetAddress().c_str());
2322 sLog.Error(
"Client",
"%s: Client's version_number not match ours!",
GetAddress().c_str());
2324 sLog.Error(
"Client",
"%s: Client's build_version not match ours!",
GetAddress().c_str());
2326 sLog.Error(
"Client",
"%s: Client's project_version not match ours!",
GetAddress().c_str());
2332 if (cr.keyVersion !=
"placebo") {
2334 CryptoAPIRequestParams car;
2335 if (!car.Decode(cr.keyParams)) {
2336 sLog.Error(
"Client",
"%s: Received invalid CryptoAPI request!",
GetAddress().c_str());
2338 sLog.Error(
"Client",
"%s: Unhandled CryptoAPI request: hashmethod=%s sessionkeylength=%d provider=%s sessionkeymethod=%s",
GetAddress().c_str(), car.hashmethod.c_str(), car.sessionkeylength, car.provider.c_str(), car.sessionkeymethod.c_str());
2339 SendErrorMsg(
"Invalid CryptoAPI request - You must change your client to use Placebo crypto in common.ini to talk to this server.");
2344 sLog.Debug(
"Client",
"%s: Received Placebo crypto request, accepting.",
GetAddress().c_str());
2363 std::string failMsg =
"Login Authorization Invalid.";
2374 failMsg =
"Your account is banned. Contact Allan for further support";
2379 failMsg =
"This account is currently online.";
2383 if (!ccp.user_password.empty()) {
2384 sLog.Warning(
" Client::Login()",
"%s(%li) - Using Plain Password", aData.
name.c_str(), aData.
clientID);
2385 if (strcmp(aData.
password.c_str(), ccp.user_password.c_str()) != 0) {
2386 failMsg =
"The plain Password you entered is incorrect for this account.";
2391 if (strcmp(aData.
hash.c_str(), ccp.user_password_hash.c_str()) != 0) {
2392 failMsg =
"The Password you entered is incorrect for this account.";
2396 if (!ccp.user_password.empty())
2403 CryptoServerHandshake server_shake;
2405 server_shake.serverChallenge =
"";
2407 server_shake.verification =
new PyBool(
false);
2408 server_shake.cluster_usercount =
sEntityList.GetClientCount();
2409 server_shake.proxy_nodeid = 0xFFAA;
2412 server_shake.challenge_responsehash =
"55087";
2422 res = server_shake.Encode();
2449 _log(NET__PRES_DEBUG,
"%s: Handshake result received.",
GetAddress().c_str());
2452 CryptoHandshakeAck ack;
2455 ack.maxSessionTime =
PyStatic.NewNone();
2459 ack.inDetention =
PyStatic.NewNone();
2460 ack.client_hash =
PyStatic.NewNone();
2461 ack.user_clientid = 0;
2464 PyRep* res(ack.Encode());
2466 res->
Dump(CLIENT__CALL_DUMP,
" ");
2495 _log(COLLECT__PACKET_DUMP,
"_SendCallReturn: Dump()");
2496 PyLogDumpVisitor dumper(COLLECT__PACKET_DUMP, COLLECT__PACKET_DUMP,
"",
true,
true);
2497 packet->
Dump(COLLECT__PACKET_DUMP, dumper);
2519 e.MsgType = msgType;
2520 e.ErrorCode = errCode;
2521 e.payload = *payload;
2625 uint32 nodeID = 0, bindID = 0;
2626 if (sscanf(req.
remoteObjectStr.c_str(),
"N=%u:%u", &nodeID, &bindID) != 2) {
2627 sLog.Error(
"Client::CallReq",
"Failed to parse bind string '%s'.", req.
remoteObjectStr.c_str());
2632 sLog.Error(
"Client::CallReq",
"Unknown nodeID - received %u but expected %u.", nodeID,
m_services.
GetNodeID());
2637 if (dest ==
nullptr) {
2638 sLog.Error(
"Client::CallReq",
"Failed to find bound object %u.", bindID);
2644 if (dest ==
nullptr) {
2645 sLog.Error(
"Client::CallReq",
"Unable to find service to handle call to: %s", packet->
dest.
service.c_str());
2646 packet->
dest.
Dump(CLIENT__CALL_DUMP,
" ");
2661 if (result.ssResult !=
nullptr)
2662 result.ssResult->Dump(CLIENT__OUT_ALL,
" ");
2663 if (result.ssNamedResult !=
nullptr)
2664 result.ssNamedResult->Dump(CLIENT__OUT_ALL,
" ");
2675 ServerNotification notify;
2676 if (!notify.Decode(packet->
payload)) {
2677 sLog.Error(
"Client::Notify",
"Failed to convert rep into a notify stream");
2681 if (notify.method ==
"ClientHasReleasedTheseObjects") {
2682 _log(SERVICE__MESSAGE,
"Client Has Released These Objects:");
2683 ServerNotification_ReleaseObj element;
2685 uint32 nodeID(0), bindID(0);
2687 for (; cur != notify.elements->end(); ++cur) {
2688 if (!element.Decode(*cur)) {
2689 sLog.Error(
"Client::Notify",
"Notification '%s' from %s: Failed to decode element. Skipping.", notify.method.c_str(),
m_char->
name());
2693 if (sscanf(element.boundID.c_str(),
"N=%u:%u", &nodeID, &bindID) != 2) {
2694 sLog.Error(
"Client::Notify",
"Notification '%s' from %s: Failed to parse bind string '%s'. Skipping.", \
2695 notify.method.c_str(),
m_char->
name(), element.boundID.c_str());
2700 sLog.Error(
"Client::Notify",
"Notification '%s' from %s: Unknown nodeID %u received (expected %u). Skipping.", \
2710 sLog.Error(
"Client::Notify",
"Unhandled notification from %s: unknown method '%s'",
m_char->
name(), notify.method.c_str());
2722 va_start(args, fmt);
2728 Notify_OnRemoteMessage n;
2729 n.msgType =
"CustomError";
2730 n.args[
"error" ] =
new PyString(str);
2744 Notify_OnRemoteMessage n;
2745 n.msgType =
"CustomError";
2746 n.args[
"error" ] =
new PyString(str);
2759 va_start(args, fmt);
2765 Notify_OnRemoteMessage n;
2766 n.msgType =
"ServerMessage";
2767 n.args[
"msg" ] =
new PyString(str);
2779 va_start(args, fmt);
2785 Notify_OnRemoteMessage n;
2786 n.msgType =
"CustomNotify";
2787 n.args[
"notify" ] =
new PyString(str);
2801 Notify_OnRemoteMessage n;
2802 n.msgType =
"CustomNotify";
2803 n.args[
"notify" ] =
new PyString(str);
2815 va_start(args, fmt);
2823 sLog.Error(
"Client",
"%s: Tried to send self chat, but we are not joined to any channels: %s",
m_char->
name(), str);
2829 sLog.White(
"Client",
"%s: Self message on all channels: %s",
m_char->
name(), str);
2833 std::set<LSCChannel*>::iterator cur =
m_channels.begin();
2835 (*cur)->SendMessage(
this, str,
true);
static bool IncrementLoginCount(uint32 accountID)
#define sConfig
A macro for easier access to the singleton.
void UpdateSessionInt(const char *sessionType, int value)
void SetPosition(const GPoint &pos)
static void SetCharacterOnlineStatus(uint32 char_id, bool online=false)
void SendNotification(const PyAddress &dest, EVENotificationStream ¬i, bool seq=true)
void AddEntity(SystemEntity *pSE, bool addSignal=true)
void AddGuest(Client *pClient)
void Reset()
Resets session.
#define IsConstellationID(itemID)
void SendErrorMsg(const char *fmt,...)
void RemoveClient(Client *pClient, bool count=false, bool jump=false)
void SendInitialSessionStatus()
void SetActiveShip(uint32 shipID)
void ChannelLeft(LSCChannel *chan)
#define _log(type, fmt,...)
PyBoundObject * FindBoundObject(uint32 bindID)
void LoadStationOffice(uint32 corpID)
static const char *const EVEProjectCodename
static const uint8 marshaledNone[]
void SetLocation(uint32 stationID, SystemData &data)
std::map< uint32, bool > m_hangarLoaded
void SetAutoPilot(bool set=false)
uint32 m_nextNotifySequence
void JumpOutEffect(uint32 locationID)
void SetActivePod(uint32 podID)
void _SendPingResponse(const PyAddress &source, int64 callID)
void _SendException(const PyAddress &source, int64 callID, MACHONETMSG_TYPE in_response_to, MACHONETERR_TYPE exception_type, PyRep **payload)
void SendGateActivity(uint32 gateID) const
bool SetFlag(EVEItemFlags flag, bool notify=false)
void SetLong(const char *name, int64 value)
void MoveToLocation(uint32 location, const GPoint &pt)
ModuleManager * GetModuleManager()
PyService * LookupService(const std::string &name)
void UpdateFleetSession(CharFleetData &fleet)
const GPoint & position() const
Client(PyServiceMgr &services, EVETCPConnection **con)
SystemBubble * SysBubble()
void SendJumpInEffect(std::string JumpEffect) const
void SendJumpOutEffect(std::string JumpEffect, uint32 locationID) const
ShipItemRef GetShipItemRef()
void SetBallParkTimer(uint32 time=Player::Timer::Default)
void MoveItem(uint32 itemID, uint32 location, EVEItemFlags flag)
void QueueDestinyEvent(PyTuple **multiEvent)
bool IsMissionComplete(MissionOffer &data)
PyList * m_destinyEventQueue
void SendInfoModalMsg(const char *fmt,...)
bool SelectCharacter(int32 char_id=0)
int32 GetCharacterID() const
int32 GetWarFactionID() const
bool Handle_Notify(PyPacket *packet)
int32 GetCorporationID() const
void _GetVersion(VersionExchangeServer &version)
Obtains version.
bool _LoginFail(std::string fail_msg)
storage_type::const_iterator const_iterator
std::string GetAddress() const
std::string GetStateName(int8 state)
static void SetAccountBanStatus(uint32 accountID, bool banned=false)
void SetPosition(const GPoint &pos)
void QueueRep(const PyRep *rep, bool compress=true)
Queues given PyRep into send queue.
void CharNoLongerInStation()
bool m_sessionChangeActive
PyRep * GetAggressors() const
void SendNotifyMsg(const char *fmt,...)
CharacterRef GetChar() const
void InitSession(int32 characterID)
Advanced version of UserError that allows to send a full custom message.
uint32 GetRemainingTime() const
void Dump(FILE *into, const char *pfx) const
Dumps object to file.
bool ContainsTypeQty(uint16 typeID, uint32 qty) const
uint32 solarSystemID() const
void SendSetState() const
int32 GetAllianceID() const
const GPoint & GetPosition() const
void Move(uint32 new_location=locTemp, EVEItemFlags flag=flagNone, bool notify=false)
void Clear(const char *name)
static const uint16 MachoNetVersion
std::set< LSCChannel * > m_channels
bool Handle_CallReq(PyPacket *packet, PyCallStream &req)
void CancelTrade(Client *pClient)
void SafeDelete(T *&p)
Deletes and nullifies a pointer.
void RemoveMissionItem(uint16 typeID, uint32 qty)
void SelfChatMessage(const char *fmt,...)
const GPoint GetRandPointOnPlanet(uint32 systemID)
void MoveToPosition(const GPoint &pt)
void Dump(FILE *into, const char *pfx) const
uint32 constellationID() const
void CheckBallparkTimer()
std::string GetLanguageID() const
int vasprintf(char **strp, const char *fmt, va_list ap)
bool HasShip(Client *pClient)
#define is_log_enabled(type)
#define sLog
Evaluates to a NewLog instance.
Value keeper for single EVE session.
void Dump(LogType type, PyVisitor &dumper)
void RemoveStationHangar(uint32 stationID)
void SafeFree(T *&p)
Frees and nullifies an array pointer.
Base class for exceptions that can be converted to python objects.
DestinyManager * DestinyMgr()
SystemManager * SystemMgr()
void SetInvul(bool invul=false)
bool _VerifyVersion(VersionExchangeClient &version)
Verifies version.
void VisitSystem(uint32 solarSystemID)
EVE derivation of TCP connection.
static const char *const EVEProjectVersion
#define IsPlayerItem(itemID)
static const double EVEVersionNumber
PyTuple * new_tuple(int64 arg1)
static const int32 EVEBuildVersion
const char * MACHONETMSG_TYPE_NAMES[MACHONETMSG_TYPE_COUNT]
static void UpdatePassword(uint32 accountID, const char *pass)
#define codelog(type, fmt,...)
void SetItem(size_t index, PyRep *object)
Stores Python object.
static void SetAccountOnlineStatus(uint32 accountID, bool online=false)
void SendJumpOut(uint32 gateID) const
std::map< uint32, uint32 > m_lpMap
void SetShip(ShipItemRef shipRef)
static const GPoint NULL_ORIGIN(0, 0, 0)
void RemoveEntity(SystemEntity *pSE)
PyList * m_destinyUpdateQueue
void ChannelJoined(LSCChannel *chan)
void SetShipCapacitorLevel(float fraction)
void MakeRandomPointOnSphereLayer(double radiusInner, double radiusOuter)
uint32 locationID() const
void SetLauncherID(uint32 shipID)
bool AlterQuantity(int32 qty, bool notify=false)
void CharacterLogin(Client *pClient)
void UpdateCorpSession(CorpData &data)
TradeSession * GetTradeSession()
void SetDockCount(Client *pClient, bool docked=false)
void SetSpeedFraction(float fraction=1.0f, bool startMovement=false)
PyServiceMgr & m_services
void SetUncloakTimer(uint32 time=Player::Timer::Default)
void SetUndocking(bool set=false)
bool Check(bool reset=true)
void AddClient(Client *pClient, bool count=false, bool jump=false)
ShipItemRef GetShip() const
const char * GetName() const
void ChangeOwner(uint32 new_owner, bool notify=false)
void Board(ShipSE *newShipSE)
void ResetAfterPopped(GPoint &position)
void SkillQueueLoop(bool update=true)
void UpdateNewShip(const ShipItemRef newShipRef)
void QueueDestinyUpdate(PyTuple **update, bool DoPackage=false, bool IsSetState=false)
#define IsCharacterID(itemID)
#define IsSquadID(itemID)
Python object "ccp_exceptions.UserError".
void SetUncloak(bool uncloak=false)
StationItemRef GetStationFromInventory(uint32 stationID)
Client session from server's side.
void SetPosition(const GPoint &pt, bool update=false)
void CloseClientConnection()
Disconnects client from the server.
void SetCustomInfo(const char *ci)
EVEItemFlags flag() const
PyServiceMgr * GetServiceMgr()
int32 GetCloneStationID() const
void LoadStationHangar(uint32 stationID)
void ApplyBoost(BoostData &bData)
static const int32 EVEBirthday
EVETCPConnection *const mNet
void QueuePacket(PyPacket *packet)
Queues new packet, retaking ownership.
void SetInvulTimer(uint32 time=Player::Timer::Default)
std::set< uint32 > m_bindSet
void CharacterLeavingShip()
uint32 GetLoyaltyPoints(uint32 corpID)
RefPtr< ShipItem > ShipItemRef
void BoardShip(ShipItemRef newShipRef)
static void GetCharacterData(uint32 charID, std::map< std::string, int64 > &characterDataMap)
#define IsModuleSlot(flag)
const char * GetName() const
int64 MakeRandomInt(int64 low, int64 high)
Generates random integer from interval [low; high].
const std::string & itemName() const
#define IsCargoHoldFlag(flag)
void SetDestiny(const GPoint &pt, bool update=false)
void ResetShipSystemMgr(SystemManager *pSystem)
void StargateJump(uint32 fromGate, uint32 toGate)
static bool GetAccountInformation(CryptoChallengePacket &ccp, AccountData &aData, std::string &failMsg)
void _SendQueuedUpdates()
#define IsFleetID(itemID)
virtual void SetPlayer(Client *pClient)
void SetString(const char *name, const char *value)
GaExpInl bool isZero() const
PyPacket * PopPacket()
Pops new packet from queue.
typeID Spawn an NPC with the specified type text Search for items matching the specified query() type()() itemID() copy() materialLevel()() itemID(attributeID)-Retrieves attribute value." ) COMMAND( setattr
uint32 PickAlternateShip(uint32 locationID)
ShipItemRef SpawnNewRookieShip(uint32 stationID)
void SetStateTimer(int8 state, uint32 time=Player::Timer::Default)
void ProcessScan(bool useProbe=false)
virtual void SetPilot(Client *pClient)
int8 GetSkillLevel(uint16 skillTypeID, bool zeroForNotInjected=true) const
static void AddJump(uint32 sysID)
Python object "exceptions.GPSTransportClosed".
void SendServerMOTD(Client *pClient)
virtual PyResult Call(const std::string &method, PyCallArgs &args)
static bool ValidateAccountName(CryptoChallengePacket &ccp, std::string &failMsg)
void EnterSystem(uint32 systemID)
StationData m_StationData
uint32 _GetQueuePosition()
bool DispatchPacket(PyPacket *packet)
std::string remoteObjectStr
GaExpInl GaFloat distance(const GaVec3 &oth) const
void SetInt(const char *name, int32 value)
void MakeRandomPointOnSphere(double radius)
#define IsRegionID(itemID)
void SetShipShield(float fraction)
void ClearBoundObject(uint32 bindID)
void _SendCallReturn(const PyAddress &source, int64 callID, PyResult &rsp)
bool _VerifyCrypto(CryptoRequestPacket &cr)
Verifies crypto.
Inventory * GetMyInventory()
static const char *const EVEProjectRegion
void SetCloakTimer(uint32 time=Player::Timer::Default)
entityID heal the character with the entityID note giving you detailed ship status information gives a list of all dynamic entities and players and their destinyState in this bubble shows some current destiny variables save all kick all and halt server immediate command list all items in current location s gives list of cargo contents and volumes in all holds list current session values show current ship DNA show current objects in their destiny state
void CynoJump(InventoryItemRef beacon)
InventoryItemRef GetByTypeFlag(uint32 typeID, EVEItemFlags flag) const
void SetClient(Client *pClient)
bool _VerifyLogin(CryptoChallengePacket &ccp)
Verifies login.
bool IsHangarLoaded(uint32 stationID)
std::string GetAddress() const
void CheckShipRef(ShipItemRef newShipRef)
void EncodeChanges(PyDict *into)
void SetItemString(const char *key, PyRep *value)
SetItemString adds or sets a database entry.
void EncodeInitialState(PyDict *into)
void AddStationHangar(uint32 stationID)
void Jump(bool showCloak=true)
bool _VerifyFuncResult(CryptoHandshakeResult &result)
Verifies function result.
void Start(uint32 setTimerTime=0, bool changeResetTimer=true)
static const uint32 PING_INTERVAL_MS