]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_cgiirc.cpp
Replace all abstract usages of his/he/her with they/their/it.
[user/henk/code/inspircd.git] / src / modules / m_cgiirc.cpp
index 4a5a4fb030d861d71f0d82e550b0b3d39fbd468d..d80719c1725b6ad03f44d05d8921a6cb9f91ccc1 100644 (file)
@@ -34,29 +34,6 @@ enum
        RPL_WHOISGATEWAY = 350
 };
 
-// We need this method up here so that it can be accessed from anywhere
-static void ChangeIP(LocalUser* user, const irc::sockets::sockaddrs& sa)
-{
-       // Set the users IP address and make sure they are in the right clone pool.
-       ServerInstance->Users->RemoveCloneCounts(user);
-       user->SetClientIP(sa);
-       ServerInstance->Users->AddClone(user);
-       if (user->quitting)
-               return;
-
-       // Recheck the connect class.
-       user->MyClass = NULL;
-       user->SetClass();
-       user->CheckClass();
-       if (user->quitting)
-               return;
-
-       // Check if this user matches any XLines.
-       user->CheckLines(true);
-       if (user->quitting)
-               return;
-}
-
 // Encapsulates information about an ident host.
 class IdentHost
 {
@@ -155,7 +132,7 @@ class CommandWebIRC : public SplitCommand
        {
                allow_empty_last_param = false;
                works_before_reg = true;
-               this->syntax = "<password> <gateway> <hostname> <ip> [flags]";
+               this->syntax = "<password> <gateway> <hostname> <ip> [<flags>]";
        }
 
        CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE
@@ -215,7 +192,7 @@ class CommandWebIRC : public SplitCommand
 
                        // Set the IP address sent via WEBIRC. We ignore the hostname and lookup
                        // instead do our own DNS lookups because of unreliable gateways.
-                       ChangeIP(user, ipaddr);
+                       user->SetClientIP(ipaddr);
                        return CMD_SUCCESS;
                }
 
@@ -334,7 +311,7 @@ class ModuleCgiIRC
                        }
                        else
                        {
-                               throw ModuleException(type + " is an invalid <cgihost:mask> type, at " + tag->getTagLocation()); 
+                               throw ModuleException(type + " is an invalid <cgihost:mask> type, at " + tag->getTagLocation());
                        }
                }
 
@@ -391,8 +368,8 @@ class ModuleCgiIRC
                                user->uuid.c_str(), user->GetIPString().c_str(), address.addr().c_str(), user->ident.c_str(), newident.c_str());
 
                        user->ChangeIdent(newident);
-                       ChangeIP(user, address);
-                       break; 
+                       user->SetClientIP(address);
+                       break;
                }
                return MOD_RES_PASSTHRU;
        }