diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-10 14:59:30 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2004-04-10 14:59:30 +0000 |
commit | b53dc2ea9ae2d961c38715b26ae96a750c3944a4 (patch) | |
tree | a30b3009ac1818e82fc59034908bdac362af928e /src/inspircd.cpp | |
parent | b6ec41644d7bd8d87959fb1a12fbe393c132bf6b (diff) |
Fixes to JOIN
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@496 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r-- | src/inspircd.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 813091798..9bfc4ea6f 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1438,17 +1438,16 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri Ptr = FindChan(cname); if (Ptr) { - FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname)); - if (MOD_RESULT) { - return NULL; - } - log(DEBUG,"add_channel: joining to: %s",Ptr->name); // the override flag allows us to bypass channel modes // and bans (used by servers) if (!override) { + FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname)); + if (MOD_RESULT) { + return NULL; + } if (strcmp(Ptr->key,"")) { @@ -1515,16 +1514,22 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri } } - } + log(DEBUG,"add_channel: bans checked"); + - log(DEBUG,"add_channel: bans checked"); + if ((Ptr) && (user)) + { + user->RemoveInvite(Ptr->name); + } + + log(DEBUG,"add_channel: invites removed"); - if ((Ptr) && (user)) + } + else { - user->RemoveInvite(Ptr->name); + log(DEBUG,"Overridden checks"); } - log(DEBUG,"add_channel: invites removed"); } created = 1; |