Преглед изворни кода

* cmd_help now shows your own record if you do not specify a nickname

svn: 1623
Bryan Drewery пре 21 година
родитељ
комит
f31f4ad699
3 измењених фајлова са 6 додато и 7 уклоњено
  1. 1 0
      doc/UPDATES
  2. 3 2
      misc/help.txt
  3. 2 5
      src/cmds.c

+ 1 - 0
doc/UPDATES

@@ -18,6 +18,7 @@ This is a summary of ChangeLog basically.
 * Fixed stdin/stdout/stderr not being closed when bot is forked into background.
 * Fixed cmd_dns not displaying results.
 * Fixed dcctable list 'leak' (no shift, leaves gaps, now dcclist is shifted only if gap at end)
+* cmd_whois with no parameters now shows your own record.
 
 1.2
 * No longer displaying SALTS on ./bin -v

+ 3 - 2
misc/help.txt

@@ -1691,8 +1691,9 @@ See also: whom
  
 See also: whom
 ::whois:
-###  $bwhois$b <nickname>
-   Shows you stored information about a user record. Five headings are
+###  $bwhois$b [nickname]
+   Shows you stored information about a user record. 
+   If no nickname is specified, your own record is shown. Five headings are
    displayed:
       $bHANDLE$b - the handle (nickname) of the user
       $bPASS$b   - "yes" if she has a password set; "no" otherwise 

+ 2 - 5
src/cmds.c

@@ -881,12 +881,9 @@ static void cmd_who(int idx, char *par)
 
 static void cmd_whois(int idx, char *par)
 {
-  if (!par[0]) {
-    dprintf(idx, "Usage: whois <handle>\n");
-    return;
-  }
   putlog(LOG_CMDS, "*", "#%s# whois %s", dcc[idx].nick, par);
-  tell_user_ident(idx, par);
+
+  tell_user_ident(idx, par[0] ? par : u->handle);
 }
 
 static void match(int idx, char *par, int isbot)