Browse Source

Added OnRehash() to RenX.DNS.

pull/3/head
JustinAJ 10 years ago
parent
commit
6e9e233fe8
  1. 8
      RenX.DNS/RenX_DNS.cpp
  2. 2
      RenX.DNS/RenX_DNS.h

8
RenX.DNS/RenX_DNS.cpp

@ -37,10 +37,16 @@ void RenX_DNSPlugin::RenX_OnJoin(RenX::Server *server, const RenX::PlayerInfo *p
(server->*func)(IRCCOLOR "03[DNS] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "'s hostname resolved to: " IRCBOLD IRCCOLOR "10%.*s" IRCBOLD, name.size(), name.ptr(), host.size(), host.ptr()); (server->*func)(IRCCOLOR "03[DNS] " IRCBOLD "%.*s" IRCBOLD IRCCOLOR "'s hostname resolved to: " IRCBOLD IRCCOLOR "10%.*s" IRCBOLD, name.size(), name.ptr(), host.size(), host.ptr());
} }
RenX_DNSPlugin::RenX_DNSPlugin() int RenX_DNSPlugin::OnRehash()
{ {
RenX_DNSPlugin::resolveAdmin = Jupiter::IRC::Client::Config->getBool(RenX_DNSPlugin::name, STRING_LITERAL_AS_REFERENCE("ResolveAdmin"), true); RenX_DNSPlugin::resolveAdmin = Jupiter::IRC::Client::Config->getBool(RenX_DNSPlugin::name, STRING_LITERAL_AS_REFERENCE("ResolveAdmin"), true);
RenX_DNSPlugin::resolvePublic = Jupiter::IRC::Client::Config->getBool(RenX_DNSPlugin::name, STRING_LITERAL_AS_REFERENCE("ResolvePublic"), false); RenX_DNSPlugin::resolvePublic = Jupiter::IRC::Client::Config->getBool(RenX_DNSPlugin::name, STRING_LITERAL_AS_REFERENCE("ResolvePublic"), false);
return 0;
}
RenX_DNSPlugin::RenX_DNSPlugin()
{
RenX_DNSPlugin::OnRehash();
} }
// Plugin instantiation and entry point. // Plugin instantiation and entry point.

2
RenX.DNS/RenX_DNS.h

@ -20,7 +20,9 @@ public: // RenX::Plugin
public: // Jupiter::Plugin public: // Jupiter::Plugin
const Jupiter::ReadableString &getName() override { return name; } const Jupiter::ReadableString &getName() override { return name; }
int OnRehash() override;
RenX_DNSPlugin(); RenX_DNSPlugin();
private: private:
STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.DNS"); STRING_LITERAL_AS_NAMED_REFERENCE(name, "RenX.DNS");
bool resolveAdmin; bool resolveAdmin;

Loading…
Cancel
Save