1
0
mirror of https://github.com/anope/anope.git synced 2026-06-25 05:56:38 +02:00

Fix bug #1028, the *_getpass and *_sendpass modules will now refuse to load if the given encryption module is unable to do decryption.

git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2147 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
cyberbotx
2009-03-09 02:35:59 +00:00
parent 54762245b8
commit 4ddc1cebd1
4 changed files with 17 additions and 1 deletions
+5 -1
View File
@@ -55,7 +55,7 @@ class CommandCSGetPass : public Command
notice_lang(s_ChanServ, u, CHAN_X_FORBIDDEN, chan);
return MOD_CONT;
}
if(!enc_decrypt(ci->founderpass, tmp_pass, PASSMAX - 1)==1)
if (!enc_decrypt(ci->founderpass, tmp_pass, PASSMAX - 1))
{
notice_lang(s_ChanServ, u, CHAN_GETPASS_UNAVAILABLE);
return MOD_CONT;
@@ -98,6 +98,10 @@ class CSGetPass : public Module
this->AddCommand(CHANSERV, new CommandCSGetPass(), MOD_UNIQUE);
this->SetChanHelp(myChanServHelp);
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
};
+4
View File
@@ -103,6 +103,10 @@ class CSSendPass : public Module
if (!UseMail)
throw ModuleException("sendpass may not be loaded if UseMail is loaded");
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
};
+4
View File
@@ -91,6 +91,10 @@ class NSGetPass : public Module
this->AddCommand(NICKSERV, new CommandNSGetPass(), MOD_UNIQUE);
this->SetNickHelp(myNickServHelp);
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
};
+4
View File
@@ -100,6 +100,10 @@ class NSSendPass : public Module
if (!UseMail)
throw ModuleException("Not using mail, whut.");
char tmp_pass[PASSMAX];
if (!enc_decrypt("tmp", tmp_pass, PASSMAX - 1))
throw ModuleException("Incompatible with the encryption module being used");
}
};