[DiscordArchive] <@108617457836539904> now you can add WIP and Need tests?
[DiscordArchive] <@108617457836539904> now you can add WIP and Need tests?
Archived author: Viste • Posted: 2017-08-20T19:19:34.279000+00:00
Original source
and preventing to play from same ip
Archived author: Barbz • Posted: 2017-08-20T19:19:54.995000+00:00
Original source
hmm
Archived author: Viste • Posted: 2017-08-20T19:19:57.492000+00:00
Original source
but i think last is no need
Archived author: Viste • Posted: 2017-08-20T19:20:18.837000+00:00
Original source
// Prevent players to log in with the same IP
SessionMap sessions = sWorld->GetAllSessions();
for (SessionMap::iterator itr = sessions.begin(); itr != sessions.end(); ++itr)
{
if (Player* plr = itr->second->GetPlayer())
{
// GMs can log with more that one character
if (player->GetSession()->GetSecurity() >= 3)
return;
// but players are not able to
if (player != plr) // Just in case to not face the same IP as player's IP
{
if (player->GetSession()->GetRemoteAddress() == plr->GetSession()->GetRemoteAddress())
player->GetSession()->KickPlayer();
}
}
}
Archived author: Barbz • Posted: 2017-08-20T19:20:44.851000+00:00
Original source
yeah im looking at it
Archived author: Barbz • Posted: 2017-08-20T19:20:54.747000+00:00
Original source
well, i guess these things should be divided
Archived author: Barbz • Posted: 2017-08-20T19:21:02.445000+00:00
Original source
into other modules or a rather general module with config
Archived author: Barbz • Posted: 2017-08-20T19:21:08.039000+00:00
Original source
but still nice ty
)
Archived author: Barbz • Posted: 2017-08-20T19:21:30.718000+00:00
Original source
+ it shows how to make a script into a module easily (if it works
)
Archived author: Viste • Posted: 2017-08-20T19:21:52.493000+00:00
Original source
comment this