summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-12 15:57:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-06-12 15:57:51 +0000
commitcdd61fbe542032d104941310754198f2020e7af7 (patch)
tree03bd39f4fe4577832e8408bccd258ef3b772193b /src
parent8e1381822d9be8a2d319fad42f095948b71f7ca1 (diff)
If the <ALLOW> or <DENY> tag specifies an ip, and this user resolves,
then their ip will be taken as 'priority' anyway, so for example, <connect allow="127.0.0.1"> will match joe!bloggs@localhost git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3997 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/helperfuncs.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp
index a60d83459..b2c8c1b3b 100644
--- a/src/helperfuncs.cpp
+++ b/src/helperfuncs.cpp
@@ -1390,12 +1390,16 @@ int usercount(chanrec *c)
}
-/* looks up a users password for their connection class (<ALLOW>/<DENY> tags) */
+/* looks up a users password for their connection class (<ALLOW>/<DENY> tags)
+ * NOTE: If the <ALLOW> or <DENY> tag specifies an ip, and this user resolves,
+ * then their ip will be taken as 'priority' anyway, so for example,
+ * <connect allow="127.0.0.1"> will match joe!bloggs@localhost
+ */
ConnectClass GetClass(userrec *user)
{
for (ClassVector::iterator i = Config->Classes.begin(); i != Config->Classes.end(); i++)
{
- if (match(user->host,i->host.c_str()))
+ if ((match(inet_ntoa(user->ip4),i->host.c_str())) || (match(user->host,i->host.c_str())))
{
return *i;
}