Przeglądaj źródła

* Fixed +dk -host issue

svn: 1228
Bryan Drewery 22 lat temu
rodzic
commit
0f0b080d2d
2 zmienionych plików z 5 dodań i 3 usunięć
  1. 1 0
      doc/UPDATES
  2. 4 3
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -32,6 +32,7 @@ This is a summary of ChangeLog basically.
 * LAST info for .whois is now properly shared
 * Optimized lots of code to use less CPU
 * +c bots will now boot users when they lose +c
+* Fixed a bug with removing hosts while having +d or +k
 
 1.1.9
 

+ 4 - 3
src/cmds.c

@@ -3541,9 +3541,10 @@ static void cmd_mns_host(struct userrec *u, int idx, char *par)
 
   get_user_flagrec(u, &fr, NULL);
   get_user_flagrec(u2, &fr2, NULL);
-  /* check to see if user is +d or +k and don't let them remove hosts */
-  if (glob_deop(fr) || glob_kick(fr) || chan_deop(fr) || chan_kick (fr)) {
-    dprintf(idx, "You can't remove hostmasks while having the +d or +k flag.\n");
+
+  /* check to see if user is +d or +k and don't let them remove hosts from THEMSELVES*/
+  if (u == u2 && (glob_deop(fr) || glob_kick(fr) || chan_deop(fr) || chan_kick (fr))) {
+    dprintf(idx, "You can't remove hostmasks from yourself while having the +d or +k flag.\n");
       return;
     }