]> arthur.barton.de Git - ngircd.git/commitdiff
send "G" flag in WHOIS replies instead of "H" if client is marked as being away.
authorFlorian Westphal <fw@strlen.de>
Tue, 26 Feb 2008 12:06:57 +0000 (12:06 +0000)
committerFlorian Westphal <fw@strlen.de>
Tue, 26 Feb 2008 12:06:57 +0000 (12:06 +0000)
(reported by Dana Dahlstrom)

ChangeLog
NEWS
src/ngircd/irc-info.c

index 28faac7555bcbb46750b581538eb6d520a49cada..0b07949bd9e5fb659766c337743789e1fc7b739a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,7 @@
                                -- ChangeLog --
 ngIRCd 0.11.1
 
+ - send "G" instead of "H" flag in WHO replies (reported by Dana Dahlstrom).
  - Under some circumstances ngIRCd issued
  channel MODE message with a trailing space. (Dana Dahlstrom) [from HEAD]
 
@@ -737,4 +738,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.332.2.7 2008/02/16 11:26:11 fw Exp $
+$Id: ChangeLog,v 1.332.2.8 2008/02/26 12:06:57 fw Exp $
diff --git a/NEWS b/NEWS
index a9f698d6669ef8a3f9428d08769a25cfb76a65a3..7eb5c84fac735f6b7c0d2d438374db765cfd68c4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,9 @@
 
                                   -- NEWS --
 
+ngIRCd 0.11.0 (2008-02-27)
+
+  - send "G" instead of "H" flag in WHO replies (reported by Dana Dahlstrom).
 
 ngIRCd 0.11.0 (2008-01-15)
 
@@ -251,4 +254,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: NEWS,v 1.83.2.2 2008/01/15 20:45:52 alex Exp $
+$Id: NEWS,v 1.83.2.3 2008/02/26 12:06:57 fw Exp $
index 24db75dea109b59a6242b4432310ce501a872e51..4e51d757aea137d817ea3a0b6118720e76143add 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-info.c,v 1.41 2007/12/11 11:29:44 fw Exp $";
+static char UNUSED id[] = "$Id: irc-info.c,v 1.41.2.1 2008/02/26 12:06:57 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -648,7 +648,11 @@ IRC_WHO( CLIENT *Client, REQUEST *Req )
                        if( ok && (( ! only_ops ) || ( strchr( Client_Modes( c ), 'o' ))))
                        {
                                /* Get flags */
-                               strcpy( flags, "H" );
+                               if (strchr(Client_Modes( c ), 'a'))
+                                       strcpy(flags, "G"); /* away */
+                               else
+                                       strcpy(flags, "H");
+
                                if( strchr( Client_Modes( c ), 'o' )) strlcat( flags, "*", sizeof( flags ));
 
                                /* Search suitable channel */
@@ -1082,10 +1086,12 @@ IRC_Send_WHO( CLIENT *Client, CHANNEL *Chan, bool OnlyOps )
                if( strchr( Client_Modes( c ), 'i' )) is_visible = false;
                else is_visible = true;
 
-               if( is_member || is_visible )
-               {
-                       /* Flags zusammenbasteln */
-                       strcpy( flags, "H" );
+               if( is_member || is_visible ) {
+                       if (strchr(Client_Modes( c ), 'a'))
+                               strcpy(flags, "G"); /* away */
+                       else
+                               strcpy(flags, "H");
+
                        if( strchr( Client_Modes( c ), 'o' )) strlcat( flags, "*", sizeof( flags ));
                        if( strchr( Channel_UserModes( Chan, c ), 'o' )) strlcat( flags, "@", sizeof( flags ));
                        else if( strchr( Channel_UserModes( Chan, c ), 'v' )) strlcat( flags, "+", sizeof( flags ));