1
0
mirror of https://github.com/osmarks/ngircd.git synced 2024-10-28 04:46:17 +00:00

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"
This commit is contained in:
Alexander Barton 2012-08-27 23:21:28 +02:00
commit e01e8f1cb6
2 changed files with 9 additions and 0 deletions

View File

@ -256,6 +256,14 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target )
ERR_RESTRICTED_MSG, ERR_RESTRICTED_MSG,
Client_ID(Origin)); Client_ID(Origin));
break; 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 */ case 'x': /* Cloak hostname */
if (Client_HasMode(Client, 'r')) if (Client_HasMode(Client, 'r'))
ok = IRC_WriteStrClient(Origin, ok = IRC_WriteStrClient(Origin,

View File

@ -138,6 +138,7 @@
#define ERR_CHANOPRIVSNEEDED_MSG "482 %s %s :You are not channel operator" #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_CANTKILLSERVER_MSG "483 %s :You can't kill a server!"
#define ERR_RESTRICTED_MSG "484 %s :Your connection is restricted" #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_NOOPERHOST_MSG "491 %s :Not configured for your host"
#define ERR_NOTONSAMECHANNEL_MSG "493 %s :You must share a common channel with %s" #define ERR_NOTONSAMECHANNEL_MSG "493 %s :You must share a common channel with %s"