summaryrefslogtreecommitdiff
path: root/src/modules/ns_maxemail.cpp
diff options
context:
space:
mode:
authorNaram Qashat <cyberbotx@cyberbotx.com>2010-06-27 23:15:05 -0400
committerNaram Qashat <cyberbotx@cyberbotx.com>2010-06-27 23:15:05 -0400
commit28e12bc24a9c85f4f0d1e37567618ec39cb501f6 (patch)
treecc70ebeef95a9d95174afe3ef038b0d673346f58 /src/modules/ns_maxemail.cpp
parent051ebe3eea0f8529b64c0e443c61103ba2f7dee8 (diff)
The next of a few "CBX OCDing over code style" commits, maybe the last.
NOTES: I have been unable to compile the db_mysql_* functions on my system here, so those are untested. db-convert seems to be badly programmed and needs more work in my opinion.
Diffstat (limited to 'src/modules/ns_maxemail.cpp')
-rw-r--r--src/modules/ns_maxemail.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/modules/ns_maxemail.cpp b/src/modules/ns_maxemail.cpp
index 1d89a28e3..89ffd90da 100644
--- a/src/modules/ns_maxemail.cpp
+++ b/src/modules/ns_maxemail.cpp
@@ -23,9 +23,12 @@ bool check_email_limit_reached(const char *email, User * u);
int NSEmailMax = 0;
-#define LNG_NUM_STRINGS 2
-#define LNG_NSEMAILMAX_REACHED 0
-#define LNG_NSEMAILMAX_REACHED_ONE 1
+enum
+{
+ LNG_NSEMAILMAX_REACHED,
+ LNG_NSEMAILMAX_REACHED_ONE,
+ LNG_NUM_STRINGS
+};
static Module *me;
@@ -122,7 +125,6 @@ class NSMaxEmail : public Module
}
};
-
int count_email_in_use(const char *email, User * u)
{
int count = 0;
@@ -130,7 +132,7 @@ int count_email_in_use(const char *email, User * u)
if (!email)
return 0;
- for (nickcore_map::const_iterator it = NickCoreList.begin(); it != NickCoreList.end(); ++it)
+ for (nickcore_map::const_iterator it = NickCoreList.begin(), it_end = NickCoreList.end(); it != it_end; ++it)
{
NickCore *nc = it->second;