From 053f4fa5d4e013aaba7c5e0b72f3a3bb20b16b82 Mon Sep 17 00:00:00 2001 From: pk910 Date: Sat, 10 Sep 2011 02:20:34 +0200 Subject: [PATCH] fixed modcmd command (tolower) bug --- modcmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modcmd.c b/modcmd.c index a5a3e67..1da0950 100644 --- a/modcmd.c +++ b/modcmd.c @@ -45,7 +45,7 @@ static const struct default_language_entry msgtab[] = { static int get_binds_index(char first_char) { if(tolower(first_char) >= 'a' && tolower(first_char) <= 'z') { - return tolower(first_char - 'a'); + return tolower(first_char) - 'a'; } return 26; } @@ -118,7 +118,7 @@ static void handle_command(struct ClientSocket *client, struct UserNode *user, s } struct cmd_binding *cbind; for(cbind = cmd_binds[bind_index]; cbind; cbind = cbind->next) { - if(cbind->botid == client->botid && strcmp(cbind->cmd, message) == 0) { + if(cbind->botid == client->botid && stricmp(cbind->cmd, message) == 0) { //get a text bot tmp_text_client = get_prefered_bot(client->botid); //parse the arguments... -- 2.20.1