diff options
author | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-27 00:12:11 +0000 |
---|---|---|
committer | aquanight <aquanight@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-01-27 00:12:11 +0000 |
commit | 20bea3078d67a090ebcca64bf3cdbd7e6ab6adb6 (patch) | |
tree | 154357b8fdc476393e110ac48686a1160b508058 /src/modules/m_vhost.cpp | |
parent | 5773bcf973708ee2d9b0eca42fd0f8076a93f4c9 (diff) |
Change API OnOperCompare to OnPassCompare, password hashing is now available for <connect:allow>, <power die= restart=>, <title> (m_customtitle.so), <vhost> (m_vhost.so), this works the same was as for <oper>: load m_password_hash.so (after all hasher modules, of course), and add hash="md5/sha256/whatever" to the relevant tag. Also fix m_callerid.cpp crashing on unload.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8755 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_vhost.cpp')
-rw-r--r-- | src/modules/m_vhost.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_vhost.cpp b/src/modules/m_vhost.cpp index 130a8acc5..371f99dfa 100644 --- a/src/modules/m_vhost.cpp +++ b/src/modules/m_vhost.cpp @@ -35,8 +35,9 @@ class CommandVhost : public Command std::string mask = Conf->ReadValue("vhost","host",index); std::string username = Conf->ReadValue("vhost","user",index); std::string pass = Conf->ReadValue("vhost","pass",index); + std::string hash = Conf->ReadValue("vhost","hash",index); - if ((!strcmp(parameters[0],username.c_str())) && (!strcmp(parameters[1],pass.c_str()))) + if ((!strcmp(parameters[0],username.c_str())) && !ServerInstance->PassCompare(user, pass.c_str(), parameters[1], hash.c_str())) { if (!mask.empty()) { |