]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Last of the -Wshadow fixes.
[user/henk/code/inspircd.git] / src / channels.cpp
index 3a89f9e73f7b52709b551431fe419856786315fa..bb388e21e032f79de4e924b1eb940de7b03aa75e 100644 (file)
 #include "wildcard.h"
 #include "mode.h"
 
-Channel::Channel(InspIRCd* Instance, const std::string &name, time_t ts) : ServerInstance(Instance)
+Channel::Channel(InspIRCd* Instance, const std::string &cname, time_t ts) : ServerInstance(Instance)
 {
        chan_hash::iterator findchan = ServerInstance->chanlist->find(name);
        if (findchan != Instance->chanlist->end())
-               throw CoreException("Cannot create duplicate channel " + name);
+               throw CoreException("Cannot create duplicate channel " + cname);
 
-       (*(ServerInstance->chanlist))[name.c_str()] = this;
-       strlcpy(this->name, name.c_str(), CHANMAX);
+       (*(ServerInstance->chanlist))[cname.c_str()] = this;
+       strlcpy(this->name, cname.c_str(), CHANMAX);
        this->created = ts ? ts : ServerInstance->Time(true);
        this->age = this->created;
 
@@ -379,18 +379,15 @@ Channel* Channel::ForceChan(InspIRCd* Instance, Channel* Ptr, User* user, const
                ModeHandler* mh = Instance->Modes->FindPrefix(status);
                if (mh)
                {
+                       /* Set, and make sure that the mode handler knows this mode was now set */
                        Ptr->SetPrefix(user, status, mh->GetPrefixRank(), true);
-                       /* Make sure that the mode handler knows this mode was now set */
                        mh->OnModeChange(Instance->FakeClient, Instance->FakeClient, Ptr, nick, true);
 
                        switch (mh->GetPrefix())
                        {
-                               /* These logic ops are SAFE IN THIS CASE
-                                * because if the entry doesnt exist,
-                                * addressing operator[] creates it.
-                                * If they do exist, it points to it.
-                                * At all other times where we dont want
-                                * to create an item if it doesnt exist, we
+                               /* These logic ops are SAFE IN THIS CASE because if the entry doesnt exist,
+                                * addressing operator[] creates it. If they do exist, it points to it.
+                                * At all other times where we dont want to create an item if it doesnt exist, we
                                 * must stick to ::find().
                                 */
                                case '@':