From cdd61fbe542032d104941310754198f2020e7af7 Mon Sep 17 00:00:00 2001 From: brain Date: Mon, 12 Jun 2006 15:57:51 +0000 Subject: If the or tag specifies an ip, and this user resolves, then their ip will be taken as 'priority' anyway, so for example, will match joe!bloggs@localhost git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3997 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/helperfuncs.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/helperfuncs.cpp') 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 (/ tags) */ +/* looks up a users password for their connection class (/ tags) + * NOTE: If the or tag specifies an ip, and this user resolves, + * then their ip will be taken as 'priority' anyway, so for example, + * 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; } -- cgit v1.2.3