Another year is about to end... So we have to update these damn copyright information :P
[NeonServV5.git] / src / cmd_global_register.c
index 6cf85869d63a7bcf47e43f8731881582a2f5f1cb..9132484b362a445ad4a1ddcbdda3398f4a11c381 100644 (file)
@@ -1,5 +1,5 @@
 /* cmd_global_register.c - NeonServ v5.3
- * Copyright (C) 2011  Philipp Kreil (pk910)
+ * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -80,7 +80,7 @@ CMD_BIND(global_cmd_register) {
         global_cmd_register_async1(client, getTextBot(), user, chan, event, channel, NULL, multibot, botname);
         return;
     } else if(argc < 2) {
-        reply(getTextBot(), user, "MODCMD_LESS_PARAM_COUNT");
+        global_cmd_register_async1(client, getTextBot(), user, chan, event, channel, user->auth, multibot, botname);
         return;
     }
     //check own access
@@ -212,7 +212,7 @@ static void global_cmd_register_async1(struct ClientSocket *client, struct Clien
     if(client->botid)
         printf_mysql_query("SELECT `id`, `max_channels`, `defaulttrigger`, `nick` FROM `bots` WHERE `botclass` = '%d' AND `active` = '1' ORDER BY `register_priority` DESC", client->botid);
     else
-        printf_mysql_query("SELECT `id`, `max_channels`, `defaulttrigger`, `nick` FROM `bots` WHERE `botid` = '%d' AND `active` = '1'", client->clientid);
+        printf_mysql_query("SELECT `id`, `max_channels`, `defaulttrigger`, `nick` FROM `bots` WHERE `id` = '%d' AND `active` = '1'", client->clientid);
     res = mysql_use();
     int botid = 0;
     while ((row = mysql_fetch_row(res)) != NULL) {