diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 18:34:39 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-06 18:34:39 +0000 |
commit | 3e50e674c3aab0827e62d21e75b828bff0e88da7 (patch) | |
tree | 53c5aae107954aa2342e77cd702debcc6c3d8424 /src/cmd_oper.cpp | |
parent | 662253ef6e58a555ce60d26339ab05bf52540677 (diff) |
Allow nick!ident@ and ident@ portions in a CIDR mask if given, use match() without CIDR against that portion. This allows for CIDR operhosts while still matching idents (AND CIDR CHANNEL BANS)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4739 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_oper.cpp')
-rw-r--r-- | src/cmd_oper.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp index fd71b8694..f695c44f8 100644 --- a/src/cmd_oper.cpp +++ b/src/cmd_oper.cpp @@ -66,11 +66,13 @@ void cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) char TypeName[MAXBUF]; char HostName[MAXBUF]; char TheHost[MAXBUF]; + char TheIP[MAXBUF]; int j; bool found = false; bool fail2 = false; snprintf(TheHost,MAXBUF,"%s@%s",user->ident,user->host); + snprintf(TheIP, MAXBUF,"%s@%s",user->ident,user->GetIPString()); for (int i = 0; i < Config->ConfValueEnum(Config->config_data, "oper"); i++) { @@ -79,7 +81,7 @@ void cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) Config->ConfValue(Config->config_data, "oper", "type", i, OperType, MAXBUF); Config->ConfValue(Config->config_data, "oper", "host", i, HostName, MAXBUF); - if ((!strcmp(LoginName,parameters[0])) && (!operstrcmp(Password,parameters[1])) && (OneOfMatches(TheHost,user->GetIPString(),HostName))) + if ((!strcmp(LoginName,parameters[0])) && (!operstrcmp(Password,parameters[1])) && (OneOfMatches(TheHost,TheIP,HostName))) { fail2 = true; for (j =0; j < Config->ConfValueEnum(Config->config_data, "type"); j++) |