PennMUSH Community

Changeset 1086

Show
Ignore:
Timestamp:
08/24/07 00:31:53 (1 year ago)
Author:
shawnw
Message:

#7426: nwho()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 1.8.2/branches/devel/CHANGES.182

    r1080 r1086  
    1616Version 1.8.2 patchlevel 7                       ????  ??, 2007 
    1717 
    18 Fixes: 
    19   * Clarified the behavior of eval() and get_eval() in help. 
    20     Suggested by Talvo and Javelin. 
    21   * A failed db save no longer broadcasts a success message 
    22     in addition to a failure one. Reported by Cooee. 
    23   * The open database file wasn't getting closed on a failed 
    24     save. 
     18Minor changes: 
     19  * nwho() now takes an optional viewer argument like lwho(). 
     20  * nmwho() is to mwho() as nwho() is to lwho(). Patch for these two by 
     21    Sketch. 
     22 
     23Fixes: 
     24  * Clarified the behavior of eval() and get_eval() in help. Suggested by 
     25    Talvo and Javelin. 
     26  * A failed db save no longer broadcasts a success message in addition to a 
     27    failure one. Reported by Cooee. 
     28  * The open database file wasn't getting closed on a failed save. 
    2529  * Crash bug in sortkey(). Fix by Nathan Baum. 
    2630 
  • 1.8.2/branches/devel/game/txt/hlp/pennfunc.hlp

    r1045 r1086  
    27212721  will have this dbref. 
    27222722 
    2723 & NMWHO() 
    2724   nmwho() 
    2725  
    2726   This returns a count of all currently connected, non-hidden players. 
    2727   It's exactly the same as nwho() used by a mortal, and is suitable 
    2728   for use on privileged global objects who need an unprivileged count 
    2729   of who's online. 
    2730  
    2731 See also: nwho(), mwho(), xmwho() 
    27322723& NOR() 
    27332724  nor(<boolean>[, ... , <booleanN>]) 
     
    27982789 
    27992790See also: ncon(), nexits(), xthings(), lthings(), lvthings() 
     2791& NMWHO() 
    28002792& NWHO() 
    28012793  nwho() 
    2802  
    2803   This returns a count of all currently-connected players. When 
     2794  nwho(<viewer>) 
     2795  nmwho() 
     2796 
     2797  nwho() returns a count of all currently-connected players. When 
    28042798  mortals use this function, DARK wizards or royalty are NOT counted. 
    28052799 
    2806 See also: lwho(), nmwho(), xwho() 
     2800  nmwho() returns a count of all currently connected, non-hidden players. 
     2801  It's exactly the same as nwho() used by a mortal, and is suitable 
     2802  for use on privileged global objects that always need an unprivileged 
     2803  count of who is online. 
     2804 
     2805  If nwho() is given an argument, and is used by an object that can see 
     2806  DARK and Hidden players, nwho() returns the count of online players 
     2807  based on what <viewer> can see. 
     2808 
     2809See also: lwho(), mwho(), xwho(), xmwho() 
    28072810& OBJ() 
    28082811  obj(<object>) 
  • 1.8.2/branches/devel/src/bsd.c

    r1010 r1086  
    38523852{ 
    38533853  DESC *d; 
     3854  dbref victim; 
    38543855  int count = 0; 
    3855   int powered = (*(called_as + 1) != 'M'); 
     3856  int powered = ((*(called_as + 1) != 'M') && Priv_Who(executor)); 
     3857 
     3858  if (nargs && args[0] && *args[0]) { 
     3859    /* An argument was given. Find the victim and choose the lowest 
     3860     * perms possible */ 
     3861    if (!powered) { 
     3862      safe_str(T(e_perm), buff, bp); 
     3863      return; 
     3864    } 
     3865    if ((victim = noisy_match_result(executor, args[0], NOTYPE, 
     3866                                     MAT_EVERYTHING)) == 0) { 
     3867      safe_str(T(e_notvis), buff, bp); 
     3868      return; 
     3869    } 
     3870    if (!Priv_Who(victim)) 
     3871      powered = 0; 
     3872  } 
    38563873 
    38573874  DESC_ITER_CONN(d) { 
    3858     if (!Hidden(d) || (powered && Priv_Who(executor))) { 
     3875    if (!Hidden(d) || powered) { 
    38593876      count++; 
    38603877    } 
  • 1.8.2/branches/devel/src/function.c

    r1010 r1086  
    525525  {"NVPLAYERS", fun_dbwalker, 1, 1, FN_REG}, 
    526526  {"NVTHINGS", fun_dbwalker, 1, 1, FN_REG}, 
    527   {"NWHO", fun_nwho, 0, 0, FN_REG}, 
     527  {"NWHO", fun_nwho, 0, 1, FN_REG}, 
    528528  {"OBJ", fun_obj, 1, 1, FN_REG}, 
    529529  {"OBJEVAL", fun_objeval, 2, -2, FN_NOPARSE},