]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/cmd_nick.cpp
Fix all typos (not as fun as 'kill all humans' but meh, beggers cant be choosers)
[user/henk/code/inspircd.git] / src / cmd_nick.cpp
index 518d600f19c956b2b0fe6f2c91c252f4559311cf..432c2e8147e31ea57804ee5659b58455884e505d 100644 (file)
  * ---------------------------------------------------
  */
 
-using namespace std;
-
-#include "inspircd_config.h"
-#include "inspircd.h"
-#include "inspircd_io.h"
-#include <time.h>
 #include <string>
-#ifdef GCC3
-#include <ext/hash_map>
-#else
-#include <hash_map>
-#endif
-#include <map>
-#include <sstream>
 #include <vector>
-#include <deque>
+#include "inspircd_config.h"
+#include "configreader.h"
+#include "hash_map.h"
 #include "users.h"
-#include "ctables.h"
-#include "globals.h"
 #include "modules.h"
-#include "dynamic.h"
-#include "wildcard.h"
-#include "message.h"
 #include "commands.h"
-#include "mode.h"
 #include "xline.h"
-#include "inspstring.h"
 #include "dnsqueue.h"
 #include "dns.h"
 #include "helperfuncs.h"
 #include "hashcomp.h"
-#include "socketengine.h"
-#include "typedefs.h"
-#include "command_parse.h"
-#include "cmd_nick.h"
+#include "commands/cmd_nick.h"
 
 extern ServerConfig* Config;
-extern InspIRCd* ServerInstance;
 extern int MODCOUNT;
 extern std::vector<Module*> modules;
 extern std::vector<ircd_module*> factory;
 extern time_t TIME;
-extern user_hash clientlist;
-extern chan_hash chanlist;
-extern whowas_hash whowas;
-extern std::vector<userrec*> all_opers;
-extern std::vector<userrec*> local_users;
-extern userrec* fd_ref_table[MAX_DESCRIPTORS];
 
 void cmd_nick::Handle (char **parameters, int pcnt, userrec *user)
 {
@@ -115,12 +87,9 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user)
        }
        else
        {
-               if (strlen(parameters[0]) > 1)
+               if ((*parameters[0] == ':') && (*(parameters[0]+1) != 0))
                {
-                       if (parameters[0][0] == ':')
-                       {
-                               *parameters[0]++;
-                       }
+                       parameters[0]++;
                }
                if (matches_qline(parameters[0]))
                {
@@ -198,4 +167,3 @@ void cmd_nick::Handle (char **parameters, int pcnt, userrec *user)
                FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(user,oldnick));
        }
 }
-