]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/channels.cpp
Fixed to not allow :Abc NICK Abc, where the case of the old and new nick are *identical*
[user/henk/code/inspircd.git] / src / channels.cpp
index 59cfb18bd87c10341d7098e38ccc51692062e470..011469d47a6f12f800aa52f7e33592b6c5f80409 100644 (file)
@@ -19,7 +19,6 @@ using namespace std;
 #include "inspircd_config.h"
 #include "inspircd.h"
 #include "inspircd_io.h"
-#include "inspircd_util.h"
 #include <unistd.h>
 #include <sys/errno.h>
 #include <sys/ioctl.h>
@@ -62,10 +61,6 @@ extern std::vector<Module*> modules;
 extern std::vector<ircd_module*> factory;
 extern int WHOWAS_STALE;
 extern int WHOWAS_MAX;
-extern time_t startup_time;
-extern std::vector<std::string> module_names;
-extern int boundPortCount;
-extern std::stringstream config_f;
 extern time_t TIME;
 extern chan_hash chanlist;
 
@@ -73,6 +68,8 @@ using namespace std;
 
 std::vector<ModeParameter> custom_mode_params;
 
+chanrec* ForceChan(chanrec* Ptr,ucrec &a,userrec* user, int created);
+
 chanrec::chanrec()
 {
        strcpy(name,"");
@@ -278,12 +275,13 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
                                 }
                                 if (Ptr->binarymodes & CM_INVITEONLY)
                                 {
-                                        MOD_RESULT = 0;
+                                       MOD_RESULT = 0;
+                                       irc::string xname(Ptr->name);
                                         FOREACH_RESULT(OnCheckInvite(user, Ptr));
                                         if (!MOD_RESULT)
                                         {
                                                 log(DEBUG,"add_channel: channel is +i");
-                                                if (user->IsInvited(Ptr->name))
+                                                if (user->IsInvited(xname))
                                                 {
                                                         /* user was invited to channel */
                                                         /* there may be an optional channel NOTICE here */
@@ -294,7 +292,7 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
                                                         return NULL;
                                                 }
                                         }
-                                        user->RemoveInvite(Ptr->name);
+                                        user->RemoveInvite(xname);
                                 }
                                 if (Ptr->limit)
                                 {