1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
void IrcBot::irc_on_chat(irc_session_t* session, const char* event, const char* origin, const char** params, unsigned int count)
{
if(strcmp(params[1], "O Hai!") == true)
irc_cmd_msg(session, channel, "O Hai!");
if(strcmp(origin, "xx1182") == true && strcmp(params[1], "O Hai!") == true)
irc_cmd_msg(session, channel, "O Hai! My lord.");
if(strcmp(params[1], "Buonanotte") == true || strcmp(params[1], "buonanotte") == true || strcmp(params[1], "Notte") == true || strcmp(params[1], "nnotte") == true)
{
std::string msg ("Buonanotte, ");
msg += origin;
char cmsg[24];
std::strcpy(cmsg, msg.c_str());
irc_cmd_msg(session, channel, cmsg);
}
}
|