From c471b18d773369cfef99f9dc02ff15905599facc Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 3 Apr 2005 19:51:37 +0000 Subject: Fix for bug #39, m_redirect returning invalid/random value for OnUserPreJoin method of the module class git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@966 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 8 +++++--- src/modules/m_redirect.cpp | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 60fcbe378..03db53f40 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -1375,17 +1375,19 @@ chanrec* add_channel(userrec *user, const char* cn, const char* key, bool overri // the override flag allows us to bypass channel modes // and bans (used by servers) - if (!override) + if ((!override) || (!strcasecmp(user->server,ServerName))) { + log(DEBUG,"Not overriding..."); int MOD_RESULT = 0; FOREACH_RESULT(OnUserPreJoin(user,Ptr,cname)); if (MOD_RESULT == 1) { return NULL; } + log(DEBUG,"MOD_RESULT=%d",MOD_RESULT); - if (MOD_RESULT == 0) + if (!MOD_RESULT) { - + log(DEBUG,"add_channel: checking key, invite, etc"); if (strcmp(Ptr->key,"")) { log(DEBUG,"add_channel: %s has key %s",Ptr->name,Ptr->key); diff --git a/src/modules/m_redirect.cpp b/src/modules/m_redirect.cpp index e81864565..b6b4062e2 100644 --- a/src/modules/m_redirect.cpp +++ b/src/modules/m_redirect.cpp @@ -90,6 +90,7 @@ class ModuleRedirect : public Module } } } + return 0; } virtual ~ModuleRedirect() -- cgit v1.2.3