diff --git a/src/parse.c b/src/parse.c --- a/src/parse.c +++ b/src/parse.c @@ -48,6 +48,7 @@ #define BAN 22 #define UNBAN 23 #define KICKBAN 24 +#define HELLO 25 const char *COMMAND_LIST[] = { @@ -82,7 +83,7 @@ "!who", "!whois", "!time", "!tell", "!op", "!deop", "!kick", "!ban", "!unban", - "!kickban", + "!kickban", "!hello", NULL }; @@ -96,7 +97,6 @@ time_t t; struct tm *timeptr; - static int counter = 0; /* * default message @@ -109,23 +109,6 @@ if (!strcmp (message->channel, message->nick)) message->channel = message->user; - if (strstr (message->line, message->nick)) { - if (*message->line != '!') { - /* - * DEADLOCK-CHECK - */ - if (strcmp (message->user, message->nick)) { - snprintf (msg, 512, "PRIVMSG %s :%s, %s?\r\n", message->channel, gettext ("What's up"), message->user); - if (counter++ > 2) - return NULL; - return msg; - } - } - return NULL; - } - - counter = 0; - /* * NO BOT Commands */ @@ -215,8 +198,8 @@ return msg; case INFO: - snprintf (msg, 512, "PRIVMSG %s :I am MCBot-%1.2f and my source code can be found on %s\r\n", - message->channel, BOT_VERSION, SOURCE_URL); + snprintf (msg, 512, "PRIVMSG %s :I am MCBot-%1.2f Build %s and my source code can be found at %s\r\n", + message->channel, BOT_VERSION, BOT_BUILD, SOURCE_URL); return msg; case PING: @@ -343,6 +326,10 @@ } } return msg; + + case HELLO: + snprintf (msg, 512, "PRIVMSG %s :%s, %s?\r\n", message->channel, gettext ("What's up"), message->user); + return msg; } } i++;