]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Removed a pointless check in ./configure --clean that made it only work with one...
[user/henk/code/inspircd.git] / src / channels.cpp
index 8a857f4af8751b753b69804d534ffe5be19d06ba..8a44479e068e122037a42f45c792302596f32cf3 100644 (file)
@@ -1,21 +1,16 @@
-/*   +------------------------------------+
- *   | Inspire Internet Relay Chat Daemon |
- *   +------------------------------------+
+/*       +------------------------------------+
+ *       | Inspire Internet Relay Chat Daemon |
+ *       +------------------------------------+
+ *
+ *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
+ * See: http://www.inspircd.org/wiki/index.php/Credits
  *
- *  InspIRCd is copyright (C) 2002-2006 ChatSpike-Dev.
- *   E-mail:
- *       <brain@chatspike.net>
- *       <Craig@chatspike.net>
- * 
- * Written by Craig Edwards, Craig McLure, and others.
  * This program is free but copyrighted software; see
- *     the file COPYING for details.
+ *            the file COPYING for details.
  *
  * ---------------------------------------------------
  */
 
-using namespace std;
-
 #include <stdarg.h>
 #include "configreader.h"
 #include "inspircd.h"
@@ -28,7 +23,6 @@ chanrec::chanrec(InspIRCd* Instance) : ServerInstance(Instance)
 {
        *name = *topic = *setby = *key = 0;
        created = topicset = limit = 0;
-       internal_userlist.clear();
        memset(&modes,0,64);
        age = ServerInstance->Time(true);
 }
@@ -274,11 +268,10 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
                                if (Ptr->modes[CM_INVITEONLY])
                                {
                                        MOD_RESULT = 0;
-                                       irc::string xname(Ptr->name);
                                        FOREACH_RESULT_I(Instance,I_OnCheckInvite,OnCheckInvite(user, Ptr));
                                        if (!MOD_RESULT)
                                        {
-                                               if (user->IsInvited(xname))
+                                               if (user->IsInvited(Ptr->name))
                                                {
                                                        /* user was invited to channel */
                                                        /* there may be an optional channel NOTICE here */
@@ -289,7 +282,7 @@ chanrec* chanrec::JoinUser(InspIRCd* Instance, userrec *user, const char* cn, bo
                                                        return NULL;
                                                }
                                        }
-                                       user->RemoveInvite(xname);
+                                       user->RemoveInvite(Ptr->name);
                                }
                                if (Ptr->limit)
                                {
@@ -367,7 +360,6 @@ chanrec* chanrec::ForceChan(InspIRCd* Instance, chanrec* Ptr, userrec* user, con
 
        dummyuser->SetFd(FD_MAGIC_NUMBER);
        Ptr->AddUser(user);
-       user->ModChannelCount(1);
 
        /* Just in case they have no permissions */
        user->chans[Ptr] = 0;
@@ -467,7 +459,6 @@ long chanrec::PartUser(userrec *user, const char* reason)
                FOREACH_MOD(I_OnUserPart,OnUserPart(user, this, reason ? reason : ""));
                this->WriteChannel(user, "PART %s%s%s", this->name, reason ? " :" : "", reason ? reason : "");
                user->chans.erase(i);
-               user->ModChannelCount(-1);
                this->RemoveAllPrefixes(user);
        }