diff options
| author | Alexander Barton <alex@barton.de> | 2012-08-27 23:20:32 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-08-27 23:20:32 +0200 |
| commit | 186ab51137886166ad56f1682d7caafff61cf304 (patch) | |
| tree | e8bb614bc4e7fc15faf6a7ae3d6cc89d28107942 /src | |
| parent | 8349a1c0d94eab61b872bb4625cbdc55feb0b86f (diff) | |
| download | ngircd-186ab51137886166ad56f1682d7caafff61cf304.tar.gz ngircd-186ab51137886166ad56f1682d7caafff61cf304.zip | |
Only allow IRC services to modify user mode "R"
Diffstat (limited to 'src')
| -rw-r--r-- | src/ngircd/irc-mode.c | 5 | ||||
| -rw-r--r-- | src/ngircd/messages.h | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index 17769360..ca4cdd06 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -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, diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h index 4aed70f3..82cc30fe 100644 --- a/src/ngircd/messages.h +++ b/src/ngircd/messages.h @@ -138,7 +138,7 @@ #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" |