mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
added ipban support
commands: /#ipban <nick> /#ipunban <ip>
This commit is contained in:
parent
371af9c241
commit
5784c14ab7
11 changed files with 271 additions and 1 deletions
|
@ -97,6 +97,16 @@ void Address::Resolve(const char *name)
|
|||
freeaddrinfo(resolved);
|
||||
}
|
||||
|
||||
std::string Address::serializeString()
|
||||
{
|
||||
unsigned int a, b, c, d;
|
||||
a = (m_address && 0xFF000000)>>24;
|
||||
b = (m_address && 0x00FF0000)>>16;
|
||||
c = (m_address && 0x0000FF00)>>8;
|
||||
d = (m_address && 0x000000FF);
|
||||
return itos(a)+"."+itos(b)+"."+itos(c)+"."+itos(d);
|
||||
}
|
||||
|
||||
unsigned int Address::getAddress() const
|
||||
{
|
||||
return m_address;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue