diff options
-rw-r--r-- | docs/inspircd.conf.example | 3 | ||||
-rw-r--r-- | src/modules/m_ident.cpp | 9 | ||||
-rw-r--r-- | src/modules/m_spanningtree/utils.cpp | 4 |
3 files changed, 9 insertions, 7 deletions
diff --git a/docs/inspircd.conf.example b/docs/inspircd.conf.example index c201385a3..e283e7950 100644 --- a/docs/inspircd.conf.example +++ b/docs/inspircd.conf.example @@ -1524,8 +1524,9 @@ # specify the timeout for ident lookups here. If not defined, it will # # default to one second. This is a non-blocking timeout which holds # # the user in a 'connecting' state until the lookup is complete. # +# The bind value indicates which IP to bind outbound requests to. # # # -#<ident timeout="5"> +#<ident timeout="5" bind=""> # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Invite except module: Adds support for channel invite exceptions (+I) diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index 3f3399d3c..3c1106b4d 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -33,7 +33,7 @@ class RFC1413 : public InspSocket userrec* u; // user record that the lookup is associated with int ufd; - RFC1413(InspIRCd* SI, userrec* user, int maxtime) : InspSocket(SI, user->GetIPString(), 113, false, maxtime), u(user) + RFC1413(InspIRCd* SI, userrec* user, int maxtime, const std::string &bindto) : InspSocket(SI, user->GetIPString(), 113, false, maxtime, bindto), u(user) { ufd = user->GetFd(); } @@ -189,14 +189,15 @@ class ModuleIdent : public Module { ConfigReader* Conf; - int IdentTimeout; + std::string PortBind; public: void ReadSettings() { Conf = new ConfigReader(ServerInstance); - IdentTimeout = Conf->ReadInteger("ident","timeout",0,true); + IdentTimeout = Conf->ReadInteger("ident", "timeout", 0, true); + PortBind = Conf->ReadValue("ident", "bind", 0); if (!IdentTimeout) IdentTimeout = 1; DELETE(Conf); @@ -245,7 +246,7 @@ class ModuleIdent : public Module user->WriteServ("NOTICE "+std::string(user->nick)+" :*** Looking up your ident..."); - RFC1413* ident = new RFC1413(ServerInstance, user, IdentTimeout); + RFC1413* ident = new RFC1413(ServerInstance, user, IdentTimeout, PortBind); if ((ident->GetState() == I_CONNECTING) || (ident->GetState() == I_CONNECTED)) { user->Extend("ident_data", (char*)ident); diff --git a/src/modules/m_spanningtree/utils.cpp b/src/modules/m_spanningtree/utils.cpp index 08f9e67eb..854e38e76 100644 --- a/src/modules/m_spanningtree/utils.cpp +++ b/src/modules/m_spanningtree/utils.cpp @@ -459,7 +459,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind) ConfigReader* Conf = new ConfigReader(ServerInstance); if (rebind) { - for (int j =0; j < Conf->Enumerate("bind"); j++) + for (int j = 0; j < Conf->Enumerate("bind"); j++) { std::string Type = Conf->ReadValue("bind","type",j); std::string IP = Conf->ReadValue("bind","address",j); @@ -510,7 +510,7 @@ void SpanningTreeUtilities::ReadConfiguration(bool rebind) LinkBlocks.clear(); ValidIPs.clear(); - for (int j =0; j < Conf->Enumerate("link"); j++) + for (int j = 0; j < Conf->Enumerate("link"); j++) { Link L; std::string Allow = Conf->ReadValue("link", "allowmask", j); |