diff options
author | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:47 +0000 |
---|---|---|
committer | danieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-09-13 20:30:47 +0000 |
commit | 91df762e93212958db487d8517addba1a63a4ddd (patch) | |
tree | 62ef9a5e926a0ba1dac698c742faf5908da400fb /src/commands/cmd_nick.cpp | |
parent | 6d57bbe05c31c79eaad02fe81cfb9c1ed6b79c58 (diff) |
Membership* changes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11697 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/commands/cmd_nick.cpp')
-rw-r--r-- | src/commands/cmd_nick.cpp | 36 |
1 files changed, 2 insertions, 34 deletions
diff --git a/src/commands/cmd_nick.cpp b/src/commands/cmd_nick.cpp index 6a181bda0..52c6a2254 100644 --- a/src/commands/cmd_nick.cpp +++ b/src/commands/cmd_nick.cpp @@ -13,26 +13,6 @@ #include "inspircd.h" #include "xline.h" -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#ifndef __CMD_NICK_H__ -#define __CMD_NICK_H__ - -// include the common header files - -#include "users.h" -#include "channels.h" /** Handle /NICK. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work @@ -54,9 +34,6 @@ class CommandNick : public Command CmdResult Handle(const std::vector<std::string>& parameters, User *user); }; -#endif - - /** Handle nick changes from users. * NOTE: If you are used to ircds based on ircd2.8, and are looking * for the client introduction code in here, youre in the wrong place. @@ -145,8 +122,8 @@ CmdResult CommandNick::Handle (const std::vector<std::string>& parameters, User { for (UCListIter i = user->chans.begin(); i != user->chans.end(); i++) { - Channel *chan = i->first; - if (chan->GetStatus(user) < STATUS_VOICE && chan->IsBanned(user)) + Channel *chan = *i; + if (chan->GetPrefixValue(user) < VOICE_VALUE && chan->IsBanned(user)) { user->WriteNumeric(404, "%s %s :Cannot send to channel (you're banned)", user->nick.c_str(), chan->name.c_str()); return CMD_FAILURE; @@ -208,15 +185,6 @@ CmdResult CommandNick::Handle (const std::vector<std::string>& parameters, User user->nick.assign(parameters[0], 0, IS_LOCAL(user) ? ServerInstance->Config->Limits.NickMax : MAXBUF); user->InvalidateCache(); - /* Update display nicks */ - for (UCListIter v = user->chans.begin(); v != user->chans.end(); v++) - { - CUList* ulist = v->first->GetUsers(); - CUList::iterator i = ulist->find(user); - if (i != ulist->end()) - i->second = user->nick; - } - if (user->registered < REG_NICKUSER) { user->registered = (user->registered | REG_NICK); |