summaryrefslogtreecommitdiff
path: root/src/modules/m_antibottler.cpp
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-23 11:41:25 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-12-23 11:41:25 +0000
commit1f1258997c2d63eb54c5addece622af37f637a7b (patch)
tree84e5c5a182d6c2b58fa41a1c7bd42bac687b64e7 /src/modules/m_antibottler.cpp
parent7820d50612c31484ba94b079c127d4cb02526c41 (diff)
Review and optimize
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2646 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_antibottler.cpp')
-rw-r--r--src/modules/m_antibottler.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/m_antibottler.cpp b/src/modules/m_antibottler.cpp
index fd91183dc..8d588cf5c 100644
--- a/src/modules/m_antibottler.cpp
+++ b/src/modules/m_antibottler.cpp
@@ -42,7 +42,6 @@ class ModuleAntiBottler : public Module
return Version(1,0,0,1,VF_VENDOR);
}
- /* XXX - OnServerRaw? Wouldn't it be easier to use an OnUserConnect, or something? --w00t */
virtual void OnServerRaw(std::string &raw, bool inbound, userrec* user)
{
if (inbound)
@@ -52,12 +51,12 @@ class ModuleAntiBottler : public Module
bool not_bottler = false;
if (!strncmp(data,"user ",5))
{
- for (unsigned int j = 0; j < strlen(data); j++)
+ for (char* j = data; *j; j++)
{
- if (data[j] == ':')
+ if (*j == ':')
break;
- if (data[j] == '"')
+ if (*j == '"')
{
not_bottler = true;
}
@@ -81,9 +80,9 @@ class ModuleAntiBottler : public Module
if (!ident || !local || !remote || !gecos)
return;
- for (unsigned int j = 0; j < strlen(remote); j++)
+ for (char* j = remote; *j; j++)
{
- if (((remote[j] < '0') || (remote[j] > '9')) && (remote[j] != '.'))
+ if (((*j < '0') || (*j > '9')) && (*j != '.'))
{
not_bottler = true;
}