summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-05 21:31:37 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-12-05 21:31:37 +0000
commit69cdf24337a462fa4d477f40e7201f1b71eb677a (patch)
tree5e9cb781575a301ba049a7fdaea98633ec6602e6
parent7adaae1083b75bf4581e8301e610332dfc5aa6f5 (diff)
Tidy up with a typedef
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5877 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/modules/m_oper_hash.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/m_oper_hash.cpp b/src/modules/m_oper_hash.cpp
index f87f46be2..b9e246c2b 100644
--- a/src/modules/m_oper_hash.cpp
+++ b/src/modules/m_oper_hash.cpp
@@ -27,15 +27,17 @@ using namespace std;
#include "m_hash.h"
+typedef std::map<irc::string, Module*> hashymodules;
+
/* Handle /MKPASSWD
*/
class cmd_mkpasswd : public command_t
{
Module* Sender;
- std::map<irc::string, Module*> &hashers;
+ hashymodules &hashers;
std::deque<std::string> &names;
public:
- cmd_mkpasswd (InspIRCd* Instance, Module* S, std::map<irc::string, Module*> &h, std::deque<std::string> &n)
+ cmd_mkpasswd (InspIRCd* Instance, Module* S, hashymodules &h, std::deque<std::string> &n)
: command_t(Instance,"MKPASSWD", 'o', 2), Sender(S), hashers(h), names(n)
{
this->source = "m_oper_hash.so";
@@ -45,7 +47,7 @@ class cmd_mkpasswd : public command_t
void MakeHash(userrec* user, const char* algo, const char* stuff)
{
/* Lets see if they gave us an algorithm which has been implemented */
- std::map<irc::string, Module*>::iterator x = hashers.find(algo);
+ hashymodules::iterator x = hashers.find(algo);
if (x != hashers.end())
{
/* Yup, reset it first (Always ALWAYS do this) */
@@ -76,7 +78,7 @@ class ModuleOperHash : public Module
cmd_mkpasswd* mycommand;
ConfigReader* Conf;
- std::map<irc::string, Module*> hashers; /* List of modules which implement HashRequest */
+ hashymodules hashers; /* List of modules which implement HashRequest */
std::deque<std::string> names; /* Module names which implement HashRequest */
public:
@@ -139,7 +141,7 @@ class ModuleOperHash : public Module
{
/* First, lets see what hash theyre using on this oper */
std::string hashtype = Conf->ReadValue("oper", "hash", tagnumber);
- std::map<irc::string, Module*>::iterator x = hashers.find(hashtype.c_str());
+ hashymodules::iterator x = hashers.find(hashtype.c_str());
/* Is this a valid hash name? (case insensitive) */
if (x != hashers.end())