diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-28 12:00:25 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-28 12:00:25 +0000 |
commit | 95840640cb374a0845c866bd1ad56a04dd833081 (patch) | |
tree | 17fb64980c11b26d33967f58064f3579d2a1ca4d /src/cmd_nick.cpp | |
parent | 9296aee7bc95c0fb2a0d00f76b908eba99e730af (diff) |
Change all references to voodoo numbers (7, 3 etc) to the new bitwise constants for user->registered
Change a lot of user->fd > -1 to use the IS_LOCAL() macro
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4569 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_nick.cpp')
-rw-r--r-- | src/cmd_nick.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd_nick.cpp b/src/cmd_nick.cpp index 17dfa626e..c13040af5 100644 --- a/src/cmd_nick.cpp +++ b/src/cmd_nick.cpp @@ -79,7 +79,7 @@ void cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0])); if (MOD_RESULT) return; - if (user->registered == 7) + if (user->registered == REG_ALL) WriteCommon(user,"NICK %s",parameters[0]); strlcpy(user->nick, parameters[0], NICKMAX - 1); FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(user,oldnick)); @@ -109,7 +109,7 @@ void cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) return; } - if (user->registered == 7) + if (user->registered == REG_ALL) { int MOD_RESULT = 0; FOREACH_RESULT(I_OnUserPreNick,OnUserPreNick(user,parameters[0])); @@ -134,9 +134,9 @@ void cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) log(DEBUG,"new nick set: %s",user->nick); - if (user->registered < 3) + if (user->registered < REG_NICKUSER) { - user->registered = (user->registered | 2); + user->registered = (user->registered | REG_NICK); // dont attempt to look up the dns until they pick a nick... because otherwise their pointer WILL change // and unless we're lucky we'll get a duff one later on. //user->dns_done = (!lookup_dns(user->nick)); @@ -165,13 +165,13 @@ void cmd_nick::Handle (const char** parameters, int pcnt, userrec *user) #endif } } - if (user->registered == 3) + if (user->registered == REG_NICKUSER) { /* user is registered now, bit 0 = USER command, bit 1 = sent a NICK command */ FOREACH_MOD(I_OnUserRegister,OnUserRegister(user)); //ConnectUser(user,NULL); } - if (user->registered == 7) + if (user->registered == REG_ALL) { FOREACH_MOD(I_OnUserPostNick,OnUserPostNick(user,oldnick)); } |