]> arthur.barton.de Git - ngircd-alex.git/commitdiff
- the server sets a correct default AWAY message when receiving a "MODE +a".
authorAlexander Barton <alex@barton.de>
Thu, 2 Jan 2003 18:03:05 +0000 (18:03 +0000)
committerAlexander Barton <alex@barton.de>
Thu, 2 Jan 2003 18:03:05 +0000 (18:03 +0000)
ChangeLog
src/ngircd/irc-mode.c

index 8c17eba37b372feabac9027a83cc317132c8def4..b36de1b15e3fa7e8ff3668daa7ce74c4ad3dfce8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -18,6 +18,8 @@ ngIRCd 0.6.x-CVS
   - The server no longer forwards commands to ordinary users, instead it
     answers with the correct error message ("no such server") now.
   - WHOIS commands weren't always forwarded as requested.
+  - The server sets a correct default AWAY message now when propagating
+    between servers.
 
 
 Older changes (sorry, only available in german language):
@@ -381,4 +383,4 @@ ngIRCd 0.0.1, 31.12.2001
 
 
 -- 
-$Id: ChangeLog,v 1.147.2.6 2003/01/01 13:46:06 alex Exp $
+$Id: ChangeLog,v 1.147.2.7 2003/01/02 18:03:05 alex Exp $
index 05664949a6a968283b1df72b18cbda7796cf42f2..6c07cb7b6b7a915b43afd60441aed513f3ba0000 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-mode.c,v 1.24 2002/12/18 14:16:21 alex Exp $";
+static char UNUSED id[] = "$Id: irc-mode.c,v 1.24.2.1 2003/01/02 18:03:05 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -156,7 +156,11 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
                {
                        case 'a':
                                /* Away */
-                               if( Client_Type( Client ) == CLIENT_SERVER ) x[0] = 'a';
+                               if( Client_Type( Client ) == CLIENT_SERVER )
+                               {
+                                       x[0] = 'a';
+                                       Client_SetAway( Client, DEFAULT_AWAY_MSG );
+                               }
                                else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin ));
                                break;
                        case 'i':
@@ -569,13 +573,14 @@ IRC_AWAY( CLIENT *Client, REQUEST *Req )
        {
                /* AWAY setzen */
                Client_SetAway( Client, Req->argv[0] );
+               Client_ModeAdd( Client, 'a' );
                IRC_WriteStrServersPrefix( Client, Client, "MODE %s :+a", Client_ID( Client ));
                return IRC_WriteStrClient( Client, RPL_NOWAWAY_MSG, Client_ID( Client ));
        }
        else
        {
                /* AWAY loeschen */
-               Client_SetAway( Client, NULL );
+               Client_ModeDel( Client, 'a' );
                IRC_WriteStrServersPrefix( Client, Client, "MODE %s :-a", Client_ID( Client ));
                return IRC_WriteStrClient( Client, RPL_UNAWAY_MSG, Client_ID( Client ));
        }