mirror of
				https://github.com/osmarks/ngircd.git
				synced 2025-10-31 22:13:00 +00:00 
			
		
		
		
	- the server sets a correct default AWAY message when receiving a "MODE +a".
This commit is contained in:
		| @@ -18,6 +18,8 @@ ngIRCd 0.6.x-CVS | |||||||
|   - The server no longer forwards commands to ordinary users, instead it |   - The server no longer forwards commands to ordinary users, instead it | ||||||
|     answers with the correct error message ("no such server") now. |     answers with the correct error message ("no such server") now. | ||||||
|   - WHOIS commands weren't always forwarded as requested. |   - 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): | 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 $ | ||||||
|   | |||||||
| @@ -14,7 +14,7 @@ | |||||||
|  |  | ||||||
| #include "portab.h" | #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 "imp.h" | ||||||
| #include <assert.h> | #include <assert.h> | ||||||
| @@ -156,7 +156,11 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ) | |||||||
| 		{ | 		{ | ||||||
| 			case 'a': | 			case 'a': | ||||||
| 				/* Away */ | 				/* 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 )); | 				else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin )); | ||||||
| 				break; | 				break; | ||||||
| 			case 'i': | 			case 'i': | ||||||
| @@ -569,13 +573,14 @@ IRC_AWAY( CLIENT *Client, REQUEST *Req ) | |||||||
| 	{ | 	{ | ||||||
| 		/* AWAY setzen */ | 		/* AWAY setzen */ | ||||||
| 		Client_SetAway( Client, Req->argv[0] ); | 		Client_SetAway( Client, Req->argv[0] ); | ||||||
|  | 		Client_ModeAdd( Client, 'a' ); | ||||||
| 		IRC_WriteStrServersPrefix( Client, Client, "MODE %s :+a", Client_ID( Client )); | 		IRC_WriteStrServersPrefix( Client, Client, "MODE %s :+a", Client_ID( Client )); | ||||||
| 		return IRC_WriteStrClient( Client, RPL_NOWAWAY_MSG, Client_ID( Client )); | 		return IRC_WriteStrClient( Client, RPL_NOWAWAY_MSG, Client_ID( Client )); | ||||||
| 	} | 	} | ||||||
| 	else | 	else | ||||||
| 	{ | 	{ | ||||||
| 		/* AWAY loeschen */ | 		/* AWAY loeschen */ | ||||||
| 		Client_SetAway( Client, NULL ); | 		Client_ModeDel( Client, 'a' ); | ||||||
| 		IRC_WriteStrServersPrefix( Client, Client, "MODE %s :-a", Client_ID( Client )); | 		IRC_WriteStrServersPrefix( Client, Client, "MODE %s :-a", Client_ID( Client )); | ||||||
| 		return IRC_WriteStrClient( Client, RPL_UNAWAY_MSG, Client_ID( Client )); | 		return IRC_WriteStrClient( Client, RPL_UNAWAY_MSG, Client_ID( Client )); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Alexander Barton
					Alexander Barton