]> code.citadel.org Git - citadel.git/blobdiff - citadel/modules/rwho/serv_rwho.c
RWHO: use the api function to check for aide access.
[citadel.git] / citadel / modules / rwho / serv_rwho.c
index 5c25a3943ad147d9c603717b0bb6216e16c28215..e509bab133d2770e149bdf48e194ee7b589051ad 100644 (file)
@@ -2,21 +2,21 @@
  * This module implements server commands related to the display and
  * manipulation of the "Who's online" list.
  *
- * Copyright (c) 1987-2009 by the citadel.org team
+ * Copyright (c) 1987-2012 by the citadel.org team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
+ *  This program is open source software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 3.
+ *  
+ *  
  *
  *  This program is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  
+ *  
+ *  
  */
 
 #include "sysdep.h"
@@ -87,7 +87,7 @@ void cmd_rwho(char *argbuf) {
                return;
        }
        
-       aide = CC->user.axlevel >= AxAideU;
+       aide = CtdlAccessCheck(ac_aide);
        cprintf("%d%c \n", LISTING_FOLLOWS, CtdlCheckExpress() );
        
        for (i=0; i<nContexts; i++) 
@@ -98,6 +98,12 @@ void cmd_rwho(char *argbuf) {
                room_spoofed = 0;
                host_spoofed = 0;
                
+               if (!aide && nptr[i].state == CON_SYS)
+                       continue;
+
+               if (!aide && nptr[i].kill_me != 0)
+                       continue;
+
                if (nptr[i].cs_flags & CS_POSTING)
                   strcat(flags, "*");
                else