diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-05 18:32:36 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-03-05 18:32:36 +0000 |
commit | 8662e00977d9425e894b43bb1c3da3dd4345f5e2 (patch) | |
tree | 6d8f355b6afab05e7a79d7a4fa455cc76ebd04c5 /src/modules/m_blockcaps.cpp | |
parent | 168369f420a0ba3658793c1c28a6e2eafc4fa03c (diff) |
OPTIMIZED!!! OPTIMIZED!!!!! :-p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3471 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_blockcaps.cpp')
-rw-r--r-- | src/modules/m_blockcaps.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_blockcaps.cpp b/src/modules/m_blockcaps.cpp index 79d706e99..e74d85a0f 100644 --- a/src/modules/m_blockcaps.cpp +++ b/src/modules/m_blockcaps.cpp @@ -42,7 +42,7 @@ public: { InsertMode(output, "P", 4); } - + virtual int OnUserPreMessage(userrec* user,void* dest,int target_type, std::string &text, char status) { if (target_type == TYPE_CHANNEL) @@ -51,9 +51,10 @@ public: if (c->IsCustomModeSet('P')) { - for(unsigned int i = 0; i < text.length(); i++) + char* n = (char*)text.c_str(); + for (char* i = n; *i; i++) { - if(((text[i] != ' ') && (text[i] != '\t')) && ((text[i] < 'A') || (text[i] > 'Z'))) + if (((*i != ' ') && (*i != '\t')) && ((*i < 'A') || (*i > 'Z'))) { return 0; } |