title: Count not incrementing even though if statement is hit
body: <p>having some trouble with a count variable i have created for a bad word filter.  Everytime the bad word check is hit i want the count to increment.  Ive tried it numerous ways but the variable will still not increment.</p>
  
  <p>I have tried it as </p>
  
  <pre><code>badCount = badCount + 1;
  badCount + 1;
  badCount = badCount++;
  badCount ++;
  </code></pre>
  
  <p>But none of these ways work.  I no this is a simple soultion but after a while i debugging i am looking to seek some help.</p>
  
  <p>This is my code below.  </p>
  
  <pre><code>bool Player::AcceptableChat(const string&amp; p_string) {
      //Old filter.
      //vector&lt;string&gt; vulger = { "fuck", "cunt", "dick", "fanny", "vagina", "bastard", "wanker", "penis", "shithead", "asshole", "bitch", "bollox",
      //"dike", "gay", "lesbian", "fucker", "wank", "masturbate", "tit", "boobs", "bent", "dickhead", "blowjob", "pussy","shit" };
  
      int badCount = 0;
      vector&lt;string&gt; vulgar;
      ifstream file("filter/Banned.txt");
      string word, temp;
      if (file.is_open()) {
          while (file.good()) {
              getline(file, word);
              vulgar.push_back(word);
          }
      }
      else {
          cout &lt;&lt; "Not loaded";
      }
      //Eliminates the user entering curse words for a name.
      for (vector&lt;string&gt;::iterator it = vulgar.begin(); it != vulgar.end(); it++) {
          if ((p_string == *it) || (p_string.find(*it) != std::string::npos)) {
              badCount++;                 
              //Testing what words are been neglected by the if statement.
              string ip = SocketLib::GetIPString(m_connection-&gt;GetRemoteAddress());
              USERLOG.Log("Player: " + m_name + "\tBanned Word: " + *it + "\tIp Address: " + ip);
              return false;
          }
      }
      cout &lt;&lt; "Bad Count: " &lt;&lt; badCount &lt;&lt; endl;
      if (badCount == 3) {
          m_connection-&gt;Close();
      }
  }
  </code></pre>
  
  <p>The function is then called above when sending a string to the connection.</p>
  
  <pre><code>if (AcceptableChat(p_string)) {
      Conn()-&gt;Protocol().SendString(*Conn(), p_string + newline);
  }
  else {
      Conn()-&gt;Protocol().SendString(*Conn(), "This message is offensive !!!" + newline);
  }
  </code></pre>