summaryrefslogtreecommitdiff
path: root/src/inspircd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inspircd.cpp')
-rw-r--r--src/inspircd.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 2f64e621d..fcc91037b 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -571,10 +571,13 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
if (!FindChan(cname))
{
- MOD_RESULT = 0;
- FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
- if (MOD_RESULT == 1) {
- return NULL;
+ if (strcmp(ServerName,u->server))
+ {
+ MOD_RESULT = 0;
+ FOREACH_RESULT(OnUserPreJoin(user,NULL,cname));
+ if (MOD_RESULT == 1) {
+ return NULL;
+ }
}
/* create a new one */
@@ -604,9 +607,9 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri
{
log(DEBUG,"add_channel: joining to: %s",Ptr->name);
- // the override flag allows us to bypass channel modes
+ // remote users are allowed us to bypass channel modes
// and bans (used by servers)
- if ((!override) || (!strcasecmp(user->server,ServerName)))
+ if (!strcasecmp(ServerName,user->server))
{
log(DEBUG,"Not overriding...");
MOD_RESULT = 0;