mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-29 22:45:34 +00:00
Some fixes
This commit is contained in:
parent
e9ee9c8b3b
commit
a92ef8b6bd
3 changed files with 9 additions and 3 deletions
|
@ -50,7 +50,7 @@ const char* getTime()
|
|||
|
||||
void Log::print(int level, const char *file, int line, const char *message, ...) const
|
||||
{
|
||||
if(level > logLevel) return;
|
||||
if(level < logLevel) return;
|
||||
std::string str = "[" + string(getTime()) + "] ";
|
||||
|
||||
if(file != 0 && line != 0)
|
||||
|
|
|
@ -107,9 +107,15 @@ int main(int argc, char *argv[])
|
|||
const char passw[8] = "1234567";
|
||||
peer->SetIncomingPassword(passw, sizeof(passw));
|
||||
|
||||
if(RakNet::NonNumericHostString(addr.c_str()))
|
||||
{
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_ERROR, "%s", "You cannot use non numeric addresses for server.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
RakNet::SocketDescriptor sd((unsigned short)port, addr.c_str());
|
||||
if (peer->Startup((unsigned)players, &sd, 1) != RakNet::RAKNET_STARTED)
|
||||
return 0;
|
||||
return 1;
|
||||
|
||||
peer->SetMaximumIncomingConnections((unsigned short)(players));
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# from 3 to 0. 3 - only errors, 0 - all messages
|
||||
loglevel = 0
|
||||
motd = My TES3MP server
|
||||
address = server.tes3mp.com
|
||||
address = 0.0.0.0
|
||||
port = 25565
|
||||
players = 4
|
||||
|
||||
|
|
Loading…
Reference in a new issue