I am trying to write an irc bot that has text games such as ghost, wheel of fortune, hangman, etc on it. Since the number of lines of code is getting big I like to divide everything up into classes and put them into seperate files. One huge one for handling the irc connection and others for handling the various games. My question is: If SendData is a member of the ircbot class, is it possible to use it in the ircgame1 and 2 classes?
Code:
#include <iostream>

class ircgame1
{
public:
	void actoncommands(std::string command);
};

void ircgame1::actoncommands(std::string command)
{
	//if (command == "!join")
		//sendmessage("I see youve joined");	// from irc bot class
}

class ircgame2
{
	void actoncommands(std::string command);
};


class ircbot
{
	public:
		void connect(); //connects to irc and a channel
		void messageloop();
	private:	
		void recvdata(std::string &data);
		void sendmessage(std::string message);
		std::string buffer;
};

void ircbot::connect()
{
	//connect to server channel etc	
}

void ircbot::recvdata(std::string &data)
{
	//recv data from irc	
}

void ircbot::messageloop()
{
	ircgame1 textgame;
	bool textgamemode = true;
	
	while (textgamemode)
	{
		recvdata(buffer);
		textgame.actoncommands(buffer);
	}
}


int main()
{
	ircbot bot;
	bot.connect();
	bot.messageloop();
	std::cin.get();
	return 0;
}
I want game1 class to be able to use ircbots sendata function to send text to irc. Is this possible, how would I go about doing this? Is there a better way?

(I can make an irc bot that connects to IRC already and have it act on commands but the ircbot class and all of its functions are getting harder and harder to look through and harder to add new feature too as the number of lines increases, I would Like an easier way to organize it)