From 8662e00977d9425e894b43bb1c3da3dd4345f5e2 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 5 Mar 2006 18:32:36 +0000 Subject: [PATCH] OPTIMIZED!!! OPTIMIZED!!!!! :-p git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3471 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_blockcaps.cpp | 7 ++++--- src/svn-rev.sh | 2 +- 2 files changed, 5 insertions(+), 4 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; } diff --git a/src/svn-rev.sh b/src/svn-rev.sh index 9404740d4..12b5c773d 100755 --- a/src/svn-rev.sh +++ b/src/svn-rev.sh @@ -1 +1 @@ -echo 3461 +echo 3464 -- 2.39.2