diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-19 19:23:53 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-08-19 19:23:53 +0000 |
commit | c61fac32bc7559e3d6f7534919f115266eee5917 (patch) | |
tree | 6984cd768398eb0f920e8c044a8613b5994e8753 /src/cmd_oper.cpp | |
parent | 9130c31f74d583894b292d09784c8e899fface4d (diff) |
Allow changing of an oper's host on oper up using <type:class> (give it a connect allow or deny line name) - implements bug #367
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7760 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cmd_oper.cpp')
-rw-r--r-- | src/cmd_oper.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd_oper.cpp b/src/cmd_oper.cpp index 331115e1d..63c7dc3e3 100644 --- a/src/cmd_oper.cpp +++ b/src/cmd_oper.cpp @@ -46,6 +46,7 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) char OperType[MAXBUF]; char TypeName[MAXBUF]; char HostName[MAXBUF]; + char ClassName[MAXBUF]; char TheHost[MAXBUF]; char TheIP[MAXBUF]; int j; @@ -75,7 +76,8 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) type_invalid = true; for (j =0; j < ServerInstance->Config->ConfValueEnum(ServerInstance->Config->config_data, "type"); j++) { - ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","name", j, TypeName, MAXBUF); + ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type", "name", j, TypeName, MAXBUF); + ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type", "class", j, ClassName, MAXBUF); if (!strcmp(TypeName,OperType)) { @@ -90,6 +92,8 @@ CmdResult cmd_oper::Handle (const char** parameters, int pcnt, userrec *user) ServerInstance->Config->ConfValue(ServerInstance->Config->config_data, "type","host", j, HostName, MAXBUF); if (*HostName) user->ChangeDisplayedHost(HostName); + if (*ClassName) + user->CheckClass(ClassName); found = true; type_invalid = false; break; |