diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-27 13:13:55 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-05-27 13:13:55 +0000 |
commit | c1940afc5f3144a2710fa026230a1b01e4231459 (patch) | |
tree | 5ae75f0f11e5f09863104851dd0faaeadefdd823 /src/modules/m_ident.cpp | |
parent | 8ffa149aa186d81b8c5017bb3f7e82d483da8898 (diff) |
Fix for bug #305, allow admin to select what port outbound ident requests bind to
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7167 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r-- | src/modules/m_ident.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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); |