void IRC::HandleIRCCommand (const char* nick, const char * channel, const char* msg) { std::string tokens[6]; //Deal w/ it, Hex tokens[0] = strtok (str," "); //Start tokenizing for (i = 1; i < 7; i++) { if (msg != NULL) { tokens[i] = strtok (NULL, " "); } vector::iterator it; for ( it= Commands::IRCCommandsList.begin ; it < Commands::IRCCommandsList.end(); it++ ) { if (strcmp(*it->Trigger.c_str(), tokens[0]) == 0) { //Search list of commands *it->Activate(nick, tokens[]); //Pass required info to the IRCCommand's Activate() function break; } }