diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/inspircd.cpp | 15 | ||||
-rw-r--r-- | src/message.cpp | 2 | ||||
-rw-r--r-- | src/modules.cpp | 2 |
3 files changed, 13 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; diff --git a/src/message.cpp b/src/message.cpp index 4ab697739..2f527c983 100644 --- a/src/message.cpp +++ b/src/message.cpp @@ -218,6 +218,7 @@ void ChangeName(userrec* user, const char* gecos) FOREACH_RESULT(OnChangeLocalUserGECOS(user,gecos)); if (MOD_RESULT) return; + FOREACH_MOD OnChangeName(user,gecos); } strlcpy(user->fullname,gecos,MAXBUF); } @@ -230,6 +231,7 @@ void ChangeDisplayedHost(userrec* user, const char* host) FOREACH_RESULT(OnChangeLocalUserHost(user,host)); if (MOD_RESULT) return; + FOREACH_MOD OnChangeHost(user,host); } strlcpy(user->dhost,host,160); } diff --git a/src/modules.cpp b/src/modules.cpp index a16cc0182..23091fc63 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -368,6 +368,8 @@ void Module::OnSyncUser(userrec* user, Module* proto, void* opaque) { }; void Module::OnSyncChannel(chanrec* chan, Module* proto, void* opaque) { }; void Module::ProtoSendMode(void* opaque, int target_type, void* target, std::string modeline) { }; void Module::OnWallops(userrec* user, std::string text) { }; +void Module::OnChangeHost(userrec* user, std::string newhost) { }; +void Module::OnChangeName(userrec* user, std::string gecos) { }; // server is a wrapper class that provides methods to all of the C-style // exports in the core |