Commit Diff
Diff:
74be9040183c113d5cb62ad25782099479a5c450
e01e8f1cb6812ac24821fa540fd6ce4e61ccbc12
Commit:
e01e8f1cb6812ac24821fa540fd6ce4e61ccbc12
Tree:
bb39ed9026117e7fd70db308576770fef572ac8e
Author:
Alexander Barton <alex@barton.de>
Committer:
Alexander Barton <alex@barton.de>
Date:
Mon Aug 27 21:21:28 2012 UTC
Message:
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"
blob - f91a28c6aca634591e785a41b2f159d6b4629e52
blob + 8da4a65aefed06ed1f41f0b0de43c9fc348201cd
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
@@ -256,6 +256,14 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Ori
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,
blob - 53637b446357a97d0a1a32d104f6355a78f4b5ef
blob + da861f9a8b45f8743f87575c912101de251daef4
--- src/ngircd/messages.h
+++ 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"
IRCNow