Commit Diff


commit - 575485eb82698a926d38634be2b3e4dce4a5dfd6
commit + 2a4bf67aaceebd3567dcd0ac1db2b9027560f574
blob - 579d5521d02772afcf76e65a8ca132c521d98b0f
blob + 01b60373bbc044153e8c742eab470a7a188318ae
--- src/ngircd/defines.h
+++ src/ngircd/defines.h
@@ -80,7 +80,7 @@
 #define RECONNECT_DELAY 3		/* Time to delay re-connect attempts
 					   in seconds. */
 
-#define USERMODES "aciorsw"		/* Supported user modes. */
+#define USERMODES "aciorswx"		/* Supported user modes. */
 #define CHANMODES "biIklmnoPstvz"	/* Supported channel modes. */
 
 #define CONNECTED true			/* Internal status codes. */
blob - 45defeb2b833f4933c24277b6fad077064b37536
blob + df464a7dba7efca0058cdede4d18ec8090a7eeea
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
@@ -185,6 +185,7 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Ori
 							ERR_NOPRIVILEGES_MSG,
 							Client_ID(Origin));
 				break;
+
 			case 'o': /* IRC operator (only unsettable!) */
 				if(( ! set ) || ( Client_Type( Client ) == CLIENT_SERVER ))
 				{
@@ -197,6 +198,15 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Ori
 			case 'r': /* Restricted (only settable) */
 				if(( set ) || ( Client_Type( Client ) == CLIENT_SERVER )) x[0] = 'r';
 				else ok = IRC_WriteStrClient( Origin, ERR_RESTRICTED_MSG, Client_ID( Origin ));
+				break;
+
+			case 'x': /* Cloak hostname */
+				if (Client_HasMode(Client, 'r'))
+					IRC_WriteStrClient(Origin,
+							   ERR_RESTRICTED_MSG,
+							   Client_ID(Origin));
+				else
+					x[0] = 'x';
 				break;
 
 			default: