summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-03 19:51:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-03 19:51:37 +0000
commitc471b18d773369cfef99f9dc02ff15905599facc (patch)
treebe68f0fa30211eaefb182fc93761e3711ff0e84a
parentd5e5aa15cfebe233bf68312b5fbe30bb7b4b9336 (diff)
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
-rw-r--r--src/inspircd.cpp8
-rw-r--r--src/modules/m_redirect.cpp1
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()