mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 20:08:37 +00:00
[Quest API] Add GetIPExemption(), GetIPString(), and SetIPExemption(exemption_amount) to Perl/Lua.
- Add $client->GetIPExemption() to Perl. - Add $client->GetIPString() to Perl. - Add $client->SetIPExemption(exemption_amount) to Perl. - Add client:GetIPExemption() to Lua. - Add client:GetIPString() to Lua. - Add client:SetIPExemption(exemption_amount) to Lua. Will make plugin::IP unnecessary and allow people to get readable IP string easier, as well as set/get IP exemptions from Perl and Lua.
This commit is contained in:
@@ -10530,6 +10530,23 @@ void Client::SetDoorToolEntityId(uint16 door_tool_entity_id)
|
||||
Client::m_door_tool_entity_id = door_tool_entity_id;
|
||||
}
|
||||
|
||||
int Client::GetIPExemption()
|
||||
{
|
||||
return database.GetIPExemption(GetIPString());
|
||||
}
|
||||
|
||||
std::string Client::GetIPString()
|
||||
{
|
||||
in_addr client_ip{};
|
||||
client_ip.s_addr = GetIP();
|
||||
return inet_ntoa(client_ip);
|
||||
}
|
||||
|
||||
void Client::SetIPExemption(int exemption_amount)
|
||||
{
|
||||
database.SetIPExemption(GetIPString(), exemption_amount);
|
||||
}
|
||||
|
||||
void Client::ReadBookByName(std::string book_name, uint8 book_type)
|
||||
{
|
||||
int16 book_language = 0;
|
||||
|
||||
Reference in New Issue
Block a user