Просмотр исходного кода

* Fixed cmd_boot attempting to boot a remote simulated dcc created by .botcmd. (#90)

svn: 2128
Bryan Drewery 21 лет назад
Родитель
Сommit
c598ab5329
3 измененных файлов с 4 добавлено и 3 удалено
  1. 2 1
      doc/UPDATES
  2. 1 1
      src/botcmd.c
  3. 1 1
      src/cmds.c

+ 2 - 1
doc/UPDATES

@@ -61,7 +61,7 @@ Lines prefixed with '-' were disabled before release and are not finishsed, or a
 * Fixed colors still showing for characters ":@()<>" when colors were turned off.
 * Fixed colors still showing for characters ":@()<>" when colors were turned off.
 * Reverted patch from 1.2 which disabled removing duplicate msgs in server queue. (Fixes most queue/excess flood bugs)
 * Reverted patch from 1.2 which disabled removing duplicate msgs in server queue. (Fixes most queue/excess flood bugs)
 * Users can no longer whois PERM OWNERS unless they are themselves one.
 * Users can no longer whois PERM OWNERS unless they are themselves one.
-* Fixed cmd_boot to allow users to boot users they can whois. (Users with lower flags)
+* Fixed cmd_boot to only allow users to boot users they can whois. (Users with lower flags)
   Also, cmd_boot will now boot all sessions of a user on the bot specified. (#37)
   Also, cmd_boot will now boot all sessions of a user on the bot specified. (#37)
 * Fixed a file descriptor leak in the 'last' checking.
 * Fixed a file descriptor leak in the 'last' checking.
 * Fixed bot's being tagged with op/login stats. (#22)
 * Fixed bot's being tagged with op/login stats. (#22)
@@ -132,6 +132,7 @@ Lines prefixed with '-' were disabled before release and are not finishsed, or a
 * Fixed hub delinking bots for not sharing instead of just offering the userfile again. (#59)
 * Fixed hub delinking bots for not sharing instead of just offering the userfile again. (#59)
 * Possibly fixed a very rare userfile sharing desync (#58)
 * Possibly fixed a very rare userfile sharing desync (#58)
 * Fixed wrong spacing in cmd_status
 * Fixed wrong spacing in cmd_status
+* Fixed cmd_boot attempting to boot a remote simulated dcc created by .botcmd. (#90)
 
 
 1.2.2
 1.2.2
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.
 * Don't sanity check flags for users on DCC CHAT if they are on the bot via .botcmd.

+ 1 - 1
src/botcmd.c

@@ -801,7 +801,7 @@ static void bot_reject(int idx, char *par)
     int ok = 0;
     int ok = 0;
 
 
     for (i = 0; i < dcc_total; i++) {
     for (i = 0; i < dcc_total; i++) {
-      if (dcc[i].type && !egg_strcasecmp(who, dcc[i].nick) && (dcc[i].type->flags & DCT_CHAT)) {
+      if (dcc[i].type && dcc[i].simul == -1 && !egg_strcasecmp(who, dcc[i].nick) && (dcc[i].type->flags & DCT_CHAT)) {
         u = get_user_by_handle(userlist, from);
         u = get_user_by_handle(userlist, from);
         if (u) {
         if (u) {
           if (!whois_access(u, dcc[idx].user)) {
           if (!whois_access(u, dcc[idx].user)) {

+ 1 - 1
src/cmds.c

@@ -1056,7 +1056,7 @@ static void cmd_boot(int idx, char *par)
     return;
     return;
   }
   }
   for (i = 0; i < dcc_total; i++) {
   for (i = 0; i < dcc_total; i++) {
-    if (dcc[i].type && !egg_strcasecmp(dcc[i].nick, who) && (dcc[i].type->flags & DCT_CANBOOT)) {
+    if (dcc[i].type && dcc[i].simul == -1 && !egg_strcasecmp(dcc[i].nick, who) && (dcc[i].type->flags & DCT_CANBOOT)) {
       if (!whois_access(dcc[idx].user, dcc[i].user)) {
       if (!whois_access(dcc[idx].user, dcc[i].user)) {
         dprintf(idx, "Sorry, you cannot boot %s.\n", dcc[i].nick);
         dprintf(idx, "Sorry, you cannot boot %s.\n", dcc[i].nick);
         return;
         return;