Selaa lähdekoodia

* Disabled ability to cmd_chpass a bot. (#42)

svn: 2312
Bryan Drewery 21 vuotta sitten
vanhempi
commit
774ff9f30c
3 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 1 0
      doc/UPDATES
  2. 2 0
      misc/help.txt
  3. 2 2
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -58,6 +58,7 @@ Lines prefixed with '-' were disabled before release and are not finished, or ar
 * Fixed cmd_chanset not displaying ALL invalid channel flags, although, there are still *many* errors like with with the chanset code. (#136)
 * Perm owners may no longer change their handle via cmd_handle or cmd_chhandle. (#107)
   (A user may change to a perm-owner handle though in a situation where the list changes in binary)
+* Disabled ability to cmd_chpass a bot. (#42)
 
 1.2.4
 * Fixed cmd_botset not displaying botnick.

+ 2 - 0
misc/help.txt

@@ -639,6 +639,8 @@ See: chhandle
    join the party line, etc. If the newpassword is 'rand', a random password
    will be used.
  
+   This has no affect on bots.
+ 
 See also: chhandle%{+n}, chsecpass%{-}
 :hub:chsecpass:
 ###  $bchsecpass$b <handle> [newpassword|rand]

+ 2 - 2
src/cmds.c

@@ -1171,8 +1171,8 @@ static void cmd_chpass(int idx, char *par)
   handle = newsplit(&par);
   if (!(u = get_user_by_handle(userlist, handle))) 
     dprintf(idx, "No such user.\n");
-  else if (!(atr & USER_MASTER) && !u->bot)
-    dprintf(idx, "You can't change passwords for non-bots.\n");
+  else if (u->bot)
+    dprintf(idx, "Bots do not have passwords.\n");
   else if (u->bot && !(atr & USER_OWNER))
     dprintf(idx, "You can't change a bot's password.\n");
   else if (!whois_access(dcc[idx].user, u))