All pastes #2062820 Raw Edit

Stuff

public text v1 · immutable
#2062820 ·published 2011-05-17 20:48 UTC
rendered paste body
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<Commands::IRCCommand>::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;
		}
		
}