From 1f1258997c2d63eb54c5addece622af37f637a7b Mon Sep 17 00:00:00 2001 From: brain Date: Fri, 23 Dec 2005 11:41:25 +0000 Subject: Review and optimize git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2646 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_antibottler.cpp | 11 +++++------ src/modules/m_botmode.cpp | 1 - src/modules/m_censor.cpp | 2 ++ 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') 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; } diff --git a/src/modules/m_botmode.cpp b/src/modules/m_botmode.cpp index 2da80206e..fe8fb9f91 100644 --- a/src/modules/m_botmode.cpp +++ b/src/modules/m_botmode.cpp @@ -36,7 +36,6 @@ class ModuleBotMode : public Module if (!Srv->AddExtendedMode('B',MT_CLIENT,false,0,0)) { Srv->Log(DEFAULT,"*** m_botmode: ERROR, failed to allocate user mode +B!"); - printf("Could not claim usermode +B for this module!"); /* XXX - do we have a debug function? */ return; } } diff --git a/src/modules/m_censor.cpp b/src/modules/m_censor.cpp index dcf4a78eb..0680644a7 100644 --- a/src/modules/m_censor.cpp +++ b/src/modules/m_censor.cpp @@ -43,6 +43,8 @@ class ModuleCensor : public Module * * XXX - Really, it'd be nice to scraip this kind of thing, and have something like * an include directive to include additional configuration files. Might make our lives easier. --w00t + * + * XXX - These module pre-date the include directive which exists since beta 5 -- Brain */ Srv = Me; Conf = new ConfigReader; -- cgit v1.2.3