title: Command filtering
body: <p>Currently writing an IRC bot for fun and I have some trouble setting up the bot to listen to my commands. ( Works for !quit but not for !join or !leave )</p>
  
  <pre><code>void onPrivMsg(IRCMessage message, IRCClient* client)
  {
      // received text
      std::string text = message.parameters.at(message.parameters.size() - 1);
  
      if (text[0] == '!')
      {
      if (text == "!Join #channel" || text == "!join #channel")
          client-&gt;SendIRC("JOIN #channel");
      if (text == "!Leave #channel" || text == "!leave #channel")
          client-&gt;SendIRC("PART #channel");
      if (text == "!Quit" || text == "!quit")
          client-&gt;SendIRC("QUIT");
      } else{
          client-&gt;SendIRC("PRIVMSG #channel :Wrong command.");
      }
  }
  </code></pre>
  
  <p>I'm calling it like so:</p>
  
  <pre><code>client.HookIRCCommand("PRIVMSG", &amp;onPrivMsg);
  </code></pre>
  
  <p>How would I get the channel name (#ChannelISpecify) from the text message line?</p>
  
  <p>Example: If I'd type "!join #funnyposts" in IRC it would join the channel #funnyposts.
  Appriciate any kind of help.</p>