misc stuff

This commit is contained in:
False.Genesis 2007-01-12 20:07:18 +00:00
parent ffc3096a0d
commit 01761191e1
5 changed files with 18 additions and 1 deletions

View File

@ -50,6 +50,7 @@ PseuInstance::PseuInstance(PseuInstanceRunnable *run)
_fastquit=false; _fastquit=false;
_startrealm=true; _startrealm=true;
createWorldSession=false; createWorldSession=false;
_error=false;
} }
@ -180,6 +181,14 @@ void PseuInstance::Run(void)
SaveAllCache(); SaveAllCache();
if(GetConf()->exitonerror == false && _error)
{
log("Exiting on error is disabled, PseuWoW is now IDLE");
log("-- Press enter to exit --");
char crap[100];
fgets(crap,sizeof(crap),stdin);
}
} }
void PseuInstance::Update() void PseuInstance::Update()

View File

@ -91,6 +91,7 @@ class PseuInstance
bool _initialized; bool _initialized;
bool _stop,_fastquit; bool _stop,_fastquit;
bool _startrealm; bool _startrealm;
bool _error;
BigNumber _sessionkey; BigNumber _sessionkey;
char *_ver,*_ver_short; char *_ver,*_ver_short;
SocketHandler _sh; SocketHandler _sh;

View File

@ -107,8 +107,9 @@ void RealmSocket::Start(void)
{ {
if(_rhost.empty() || _rport==0 || _instance==NULL) if(_rhost.empty() || _rport==0 || _instance==NULL)
return; return;
log("Connecting to Realm Server on '%s:%u'",_rhost.c_str(),_rport);
Open(_rhost,_rport);
bool result=Open(_rhost,_rport);
//... //...
_valid=true; _valid=true;
} }

View File

@ -27,6 +27,11 @@ void WorldSocket::OnDelete()
_session->SetSocket(NULL); _session->SetSocket(NULL);
} }
void WorldSocket::OnException()
{
this->SetCloseAndDelete();
}
void WorldSocket::OnRead() void WorldSocket::OnRead()
{ {
TcpSocket::OnRead(); TcpSocket::OnRead();

View File

@ -29,6 +29,7 @@ public:
void OnConnect(); void OnConnect();
void OnConnectFailed(); void OnConnectFailed();
void OnDelete(); void OnDelete();
void OnException();
void SendWorldPacket(WorldPacket &pkt); void SendWorldPacket(WorldPacket &pkt);
void InitCrypt(uint8*,uint32); void InitCrypt(uint8*,uint32);