]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/irc-mode.c
Implement user mode "c": receive connect/disconnect NOTICEs
[ngircd.git] / src / ngircd / irc-mode.c
index d22d32f01acc3c82a787ecc375a6fe041cc57e39..cd470863aa2edea492a9e818cce5103c1d50af72 100644 (file)
@@ -172,6 +172,16 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
                                else ok = IRC_WriteStrClient( Origin, ERR_NOPRIVILEGES_MSG, Client_ID( Origin ));
                                break;
 
+                       case 'c': /* Receive connect notices
+                                  * (only settable by IRC operators!) */
+                               if(!set || Client_OperByMe(Origin)
+                                  || Client_Type(Client) == CLIENT_SERVER)
+                                       x[0] = 'c';
+                               else
+                                       ok = IRC_WriteStrClient(Origin,
+                                                       ERR_NOPRIVILEGES_MSG,
+                                                       Client_ID(Origin));
+                               break;
                        case 'o': /* IRC operator (only unsettable!) */
                                if(( ! set ) || ( Client_Type( Client ) == CLIENT_SERVER ))
                                {