diff options
| author | Alexander Barton <alex@barton.de> | 2012-08-27 23:21:28 +0200 |
|---|---|---|
| committer | Alexander Barton <alex@barton.de> | 2012-08-27 23:21:28 +0200 |
| commit | e01e8f1cb6812ac24821fa540fd6ce4e61ccbc12 (patch) | |
| tree | bb39ed9026117e7fd70db308576770fef572ac8e | |
| parent | 74be9040183c113d5cb62ad25782099479a5c450 (diff) | |
| parent | 186ab51137886166ad56f1682d7caafff61cf304 (diff) | |
| download | ngircd-e01e8f1cb6812ac24821fa540fd6ce4e61ccbc12.tar.gz ngircd-e01e8f1cb6812ac24821fa540fd6ce4e61ccbc12.zip | |
Merge branch 'recognize-umode-R'
By Alexander Barton (1) and DNS777 (1) * recognize-umode-R: Only allow IRC services to modify user mode "R" Recognize user mode "R"
| -rw-r--r-- | src/ngircd/irc-mode.c | 8 | ||||
| -rw-r--r-- | src/ngircd/messages.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index f91a28c6..8da4a65a 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -256,6 +256,14 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ) ERR_RESTRICTED_MSG, Client_ID(Origin)); break; + case 'R': /* Registered (not [un]settable by clients) */ + if (Client_Type(Client) == CLIENT_SERVER) + x[0] = 'R'; + else + ok = IRC_WriteStrClient(Origin, + ERR_NICKREGISTER_MSG, + Client_ID(Origin)); + break; case 'x': /* Cloak hostname */ if (Client_HasMode(Client, 'r')) ok = IRC_WriteStrClient(Origin, diff --git a/src/ngircd/messages.h b/src/ngircd/messages.h index 53637b44..da861f9a 100644 --- a/src/ngircd/messages.h +++ b/src/ngircd/messages.h @@ -138,6 +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 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" |