fixed modcmd command (tolower) bug
authorpk910 <philipp@zoelle1.de>
Sat, 10 Sep 2011 00:20:34 +0000 (02:20 +0200)
committerpk910 <philipp@zoelle1.de>
Sat, 10 Sep 2011 00:24:35 +0000 (02:24 +0200)
modcmd.c

index a5a3e67a5514ddd1d3e288591ac1107c0aa08ca1..1da09507f6b800eb3bc655ce50ce7831d4464aac 100644 (file)
--- 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...