Module: ngircd.git Branch: master Commit: 8349a1c0d94eab61b872bb4625cbdc55feb0b86f URL: http://ngircd.barton.de/cgi-bin/gitweb.cgi?p=ngircd.git&a=commit;h=8349a...
Author: DNS777 dns@rbose.org Date: Thu Aug 23 09:25:30 2012 +0000
Recognize user mode "R"
This allows users to unset the user mode "R".
---
src/ngircd/irc-mode.c | 9 +++++++++ src/ngircd/messages.h | 1 + 2 files changed, 10 insertions(+)
diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index fa35cdd..1776936 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -256,6 +256,15 @@ 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) + 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 9ad6be1..4aed70f 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 set 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"
ngircd-commits@lists.barton.de