This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Undernet IRC Server Source Code.".
The branch, master has been updated
via 0e695c9a4daea302b55a2eef8256c38999397653 (commit)
via 3c3843682a777e2d752fe007a073116445fe5bf5 (commit)
from 6a33e1cf8899f77c63a778cdae19a45f858ac95d (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 0e695c9a4daea302b55a2eef8256c38999397653
Author: Michael Poole <[email protected]>
Date: Sat Feb 4 20:48:54 2017 -0500
iauth_cmd_usermode: Use set_user_mode(&me, cli, ...).
The local server (or its IAuth daemon) is the entity setting the mode,
after all.
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index a8562b9..110cd0c 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -2142,7 +2142,7 @@ static int iauth_cmd_usermode(struct IAuth *iauth, struct
Client *cli,
{
if (params[0][0] == '+')
{
- set_user_mode(cli, cli, parc + 2, params - 2);
+ set_user_mode(&me, cli, parc + 2, params - 2);
}
return 0;
}
commit 3c3843682a777e2d752fe007a073116445fe5bf5
Author: Michael Poole <[email protected]>
Date: Fri Feb 3 21:37:43 2017 -0500
set_user_mode: Remove allow_modes argument.
It was only ever passed as ALLOWMODES_ANY.
diff --git a/include/s_user.h b/include/s_user.h
index bfa8d13..faee6a2 100644
--- a/include/s_user.h
+++ b/include/s_user.h
@@ -49,10 +49,6 @@ struct Flags;
#define MATCH_SERVER 1 /**< flag for relay_masked_message (etc) to indicate
the mask matches a server name */
#define MATCH_HOST 2 /**< flag for relay_masked_message (etc) to indicate
the mask matches host name */
-/* used for parsing user modes */
-#define ALLOWMODES_ANY 0 /**< Allow any user mode */
-#define ALLOWMODES_DEFAULT 1 /**< Only allow the subset of modes that are
legit defaults */
-
/** Formatter function for send_user_info().
* @param who Client being displayed.
* @param sptr Client requesting information.
@@ -80,7 +76,7 @@ extern void send_user_info(struct Client* to, char* names,
int rpl,
extern int hide_hostmask(struct Client *cptr, unsigned int flags);
extern int set_user_mode(struct Client *cptr, struct Client *sptr,
- int parc, char *parv[], int allow_modes);
+ int parc, char *parv[]);
extern int is_silenced(struct Client *sptr, struct Client *acptr);
extern int hunt_server_cmd(struct Client *from, const char *cmd,
const char *tok, struct Client *one,
diff --git a/ircd/m_mode.c b/ircd/m_mode.c
index 896eba0..28c15b9 100644
--- a/ircd/m_mode.c
+++ b/ircd/m_mode.c
@@ -82,7 +82,7 @@ m_mode(struct Client *cptr, struct Client *sptr, int parc,
char *parv[])
send_reply(sptr, ERR_USERSDONTMATCH);
return 0;
}
- return set_user_mode(cptr, sptr, parc, parv, ALLOWMODES_ANY);
+ return set_user_mode(cptr, sptr, parc, parv);
}
member = find_member_link(chptr, sptr);
@@ -165,7 +165,7 @@ ms_mode(struct Client *cptr, struct Client *sptr, int parc,
char *parv[])
cli_name(cptr), cli_name(sptr));
return 0;
}
- return set_user_mode(cptr, sptr, parc, parv, ALLOWMODES_ANY);
+ return set_user_mode(cptr, sptr, parc, parv);
}
if (IsServer(sptr)) {
diff --git a/ircd/m_user.c b/ircd/m_user.c
index 29bc741..932098f 100644
--- a/ircd/m_user.c
+++ b/ircd/m_user.c
@@ -97,9 +97,9 @@ int m_user(struct Client *cptr, struct Client *sptr, int
parc, char *parv[])
* ... well, something that is probably best not said.
*/
if (mode_request & 8)
- set_user_mode(cptr, sptr, 3, invisible, ALLOWMODES_ANY);
+ set_user_mode(cptr, sptr, 3, invisible);
if (mode_request & 4)
- set_user_mode(cptr, sptr, 3, wallops, ALLOWMODES_ANY);
+ set_user_mode(cptr, sptr, 3, wallops);
}
else if (parv[2][0] == '+')
{
@@ -108,7 +108,7 @@ int m_user(struct Client *cptr, struct Client *sptr, int
parc, char *parv[])
user_modes[1] = NULL;
user_modes[2] = parv[2];
user_modes[3] = NULL;
- set_user_mode(cptr, sptr, 3, user_modes, ALLOWMODES_ANY);
+ set_user_mode(cptr, sptr, 3, user_modes);
}
info = (EmptyString(parv[parc - 1])) ? "No Info" : parv[parc - 1];
diff --git a/ircd/s_auth.c b/ircd/s_auth.c
index 7cd6914..a8562b9 100644
--- a/ircd/s_auth.c
+++ b/ircd/s_auth.c
@@ -2142,7 +2142,7 @@ static int iauth_cmd_usermode(struct IAuth *iauth, struct
Client *cli,
{
if (params[0][0] == '+')
{
- set_user_mode(cli, cli, parc + 2, params - 2, ALLOWMODES_ANY);
+ set_user_mode(cli, cli, parc + 2, params - 2);
}
return 0;
}
diff --git a/ircd/s_user.c b/ircd/s_user.c
index e68885e..3c3f7a4 100644
--- a/ircd/s_user.c
+++ b/ircd/s_user.c
@@ -365,7 +365,7 @@ int register_user(struct Client *cptr, struct Client *sptr)
if (tmpstr) {
char *umodev[] = { NULL, NULL, NULL, NULL };
umodev[2] = tmpstr;
- set_user_mode(cptr, sptr, 3, umodev, ALLOWMODES_ANY);
+ set_user_mode(cptr, sptr, 3, umodev);
}
SetUser(sptr);
@@ -405,7 +405,7 @@ int register_user(struct Client *cptr, struct Client *sptr)
if (tmpstr) {
char *umodev[] = { NULL, NULL, NULL, NULL };
umodev[2] = tmpstr;
- set_user_mode(cptr, sptr, 1, umodev, ALLOWMODES_ANY);
+ set_user_mode(cptr, sptr, 1, umodev);
}
}
else {
@@ -570,7 +570,7 @@ int set_nick_name(struct Client* cptr, struct Client* sptr,
if (parc > 7 && *parv[6] == '+') {
/* (parc-4) -3 for the ip, numeric nick, realname */
- set_user_mode(cptr, new_client, parc-7, parv+4, ALLOWMODES_ANY);
+ set_user_mode(cptr, new_client, parc-7, parv+4);
}
return register_user(cptr, new_client);
@@ -976,12 +976,10 @@ int is_snomask(char *word)
* @param[in] sptr Source (originator) of the mode change.
* @param[in] parc Number of parameters in \a parv.
* @param[in] parv Parameters to MODE.
- * @param[in] allow_modes ALLOWMODES_ANY for any mode, ALLOWMODES_DEFAULT for
- * only permitting legitimate default user modes.
* @return Zero.
*/
int set_user_mode(struct Client *cptr, struct Client *sptr, int parc,
- char *parv[], int allow_modes)
+ char *parv[])
{
char** p;
char* m;
@@ -1191,7 +1189,7 @@ int set_user_mode(struct Client *cptr, struct Client
*sptr, int parc,
}
ircd_strncpy(cli_user(sptr)->account, account, len);
}
- if (!FlagHas(&setflags, FLAG_HIDDENHOST) && do_host_hiding && allow_modes !=
ALLOWMODES_DEFAULT)
+ if (!FlagHas(&setflags, FLAG_HIDDENHOST) && do_host_hiding)
hide_hostmask(sptr, FLAG_HIDDENHOST);
if (IsRegistered(sptr)) {
-----------------------------------------------------------------------
Summary of changes:
include/s_user.h | 6 +-----
ircd/m_mode.c | 4 ++--
ircd/m_user.c | 6 +++---
ircd/s_auth.c | 2 +-
ircd/s_user.c | 12 +++++-------
5 files changed, 12 insertions(+), 18 deletions(-)
hooks/post-receive
--
Undernet IRC Server Source Code.
_______________________________________________
Patches mailing list
[email protected]
http://undernet.sbg.org/mailman/listinfo/patches