]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_hostchange.cpp
Fix an shadowing warning in the spanningtree module.
[user/henk/code/inspircd.git] / src / modules / m_hostchange.cpp
index 201c4b59b3abad3eaa4114ae004cd695d6e77e01..895e0f04a29ebba0f2a3c615a91bc4c42c71fa96 100644 (file)
@@ -34,7 +34,7 @@ class HostRule
                // Add the user's nickname to their hostname.
                HCA_ADDNICK,
 
-               // Set the user's hostname to the specific value. 
+               // Set the user's hostname to the specific value.
                HCA_SET
        };
 
@@ -47,7 +47,7 @@ class HostRule
        std::string suffix;
 
  public:
-       HostRule(const std::string& Host, const std::string& Mask, const insp::flat_set<int>& Ports)
+       HostRule(const std::string& Mask, const std::string& Host, const insp::flat_set<int>& Ports)
                : action(HCA_SET)
                , host(Host)
                , mask(Mask)
@@ -76,7 +76,7 @@ class HostRule
 
        bool Matches(LocalUser* user) const
        {
-               if (!ports.empty() && !ports.count(user->GetServerPort()))
+               if (!ports.empty() && !ports.count(user->server_sa.port()))
                        return false;
 
                if (InspIRCd::MatchCIDR(user->MakeHost(), mask))
@@ -168,7 +168,7 @@ private:
                        }
                        else
                        {
-                               throw ModuleException(action + " is an invalid <hostchange:action> type, at " + tag->getTagLocation()); 
+                               throw ModuleException(action + " is an invalid <hostchange:action> type, at " + tag->getTagLocation());
                        }
                }