projects
/
ircu2.10.12-pk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Author: Michael Poole <mdpoole@troilus.org>
[ircu2.10.12-pk.git]
/
ircd
/
gline.c
diff --git
a/ircd/gline.c
b/ircd/gline.c
index 487dde94962d28779587bb39f5f7db5d69f4ff8d..adb745cad8e280ffe90193967e284e7b9480160f 100644
(file)
--- a/
ircd/gline.c
+++ b/
ircd/gline.c
@@
-349,10
+349,11
@@
gline_propagate(struct Client *cptr, struct Client *sptr, struct Gline *gline)
/** Count number of users who match \a mask.
* @param[in] mask user\@host or user\@ip mask to check.
/** Count number of users who match \a mask.
* @param[in] mask user\@host or user\@ip mask to check.
+ * @param[in] flags Bitmask possibly containing the value GLINE_LOCAL, to limit searches to this server.
* @return Count of matching users.
*/
static int
* @return Count of matching users.
*/
static int
-count_users(char *mask)
+count_users(char *mask
, int flags
)
{
struct irc_in_addr ipmask;
struct Client *acptr;
{
struct irc_in_addr ipmask;
struct Client *acptr;
@@
-366,6
+367,8
@@
count_users(char *mask)
for (acptr = GlobalClientList; acptr; acptr = cli_next(acptr)) {
if (!IsUser(acptr))
continue;
for (acptr = GlobalClientList; acptr; acptr = cli_next(acptr)) {
if (!IsUser(acptr))
continue;
+ if ((flags & GLINE_LOCAL) && !MyConnect(acptr))
+ continue;
ircd_snprintf(0, namebuf, sizeof(namebuf), "%s@%s",
cli_user(acptr)->username, cli_user(acptr)->host);
ircd_snprintf(0, namebuf, sizeof(namebuf), "%s@%s",
cli_user(acptr)->username, cli_user(acptr)->host);
@@
-485,7
+488,7
@@
gline_add(struct Client *cptr, struct Client *sptr, char *userhost,
break;
}
break;
}
- if ((tmp = count_users(uhmask)) >=
+ if ((tmp = count_users(uhmask
, flags
)) >=
feature_int(FEAT_GLINEMAXUSERCOUNT) && !(flags & GLINE_OPERFORCE))
return send_reply(sptr, ERR_TOOMANYUSERS, tmp);
}
feature_int(FEAT_GLINEMAXUSERCOUNT) && !(flags & GLINE_OPERFORCE))
return send_reply(sptr, ERR_TOOMANYUSERS, tmp);
}