Only allow IRC services to modify user mode "R" recognize-umode-R
authorAlexander Barton <alex@barton.de>
Mon, 27 Aug 2012 21:20:32 +0000 (23:20 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 27 Aug 2012 21:20:32 +0000 (23:20 +0200)
src/ngircd/irc-mode.c
src/ngircd/messages.h

index 1776936024c23d85232eaaa09805019f93aac134..ca4cdd0624f6db851d7fdd2e0920612835066a2f 100644 (file)
@@ -256,9 +256,8 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
                                                        ERR_RESTRICTED_MSG,
                                                        Client_ID(Origin));
                        break;
-               case 'R': /* Registered (only unsettable) */
-                       if (!set || Client_Type(Client) == CLIENT_SERVICE
-                                || Client_Type(Client) == CLIENT_SERVER)
+               case 'R': /* Registered (not [un]settable by clients) */
+                       if (Client_Type(Client) == CLIENT_SERVER)
                                x[0] = 'R';
                        else
                                ok = IRC_WriteStrClient(Origin,
index 4aed70f39c783e421627f0a9b0e24bd6a587661c..82cc30fe03250ce7186fc082968cad37fc9fdae0 100644 (file)
 #define ERR_CHANOPRIVSNEEDED_MSG       "482 %s %s :You are not channel operator"
 #define ERR_CANTKILLSERVER_MSG         "483 %s :You can't kill a server!"
 #define ERR_RESTRICTED_MSG             "484 %s :Your connection is restricted"
-#define ERR_NICKREGISTER_MSG           "484 %s :Cannot set user mode (+R) -- Use IRC services"
+#define ERR_NICKREGISTER_MSG           "484 %s :Cannot modify user mode (+R) -- Use IRC services"
 #define ERR_NOOPERHOST_MSG             "491 %s :Not configured for your host"
 #define ERR_NOTONSAMECHANNEL_MSG       "493 %s :You must share a common channel with %s"