add gateway name field for auth blocks#273
add gateway name field for auth blocks#273examknow wants to merge 5 commits intosolanum-ircd:mainfrom
Conversation
|
Oops, I seem to have sniped extban progval suggested |
Since the creation of this PR, a new module was introduced using the extban char `g`, creating an unforseen conflict. This commit changes that character to `w` to match the char used in inspircd
phy1729
left a comment
There was a problem hiding this comment.
A couple of places could add a const (cap_gateway_desc, struct Client's gateway, and struct ConfItem's gateway), but there doesn't seem to be a consistent style either way.
| #include <capability.h> | ||
| #include <s_serv.h> | ||
| #include <s_newconf.h> |
There was a problem hiding this comment.
I don't think these are necessary (MAPI_CAP_CLIENT is defined in modules.h).
| /* $w by itself will match all gateway users */ | ||
| if (data == NULL) | ||
| return EmptyString(client_p->gateway) ? EXTBAN_NOMATCH : EXTBAN_MATCH; | ||
| return match(data, client_p->gateway) ? EXTBAN_MATCH : EXTBAN_NOMATCH; |
There was a problem hiding this comment.
match seems to expect the second argument to be non NULL. I think this should be something like
if EmptyString(client_p->gateway)
return EXTBAN_NOMATCH;
/* $w by itself will match all gateway users */
if (data == NULL)
return EXTBAN_MATCH;
return match(data, client_p->gateway) ? EXTBAN_MATCH : EXTBAN_NOMATCH;| } | ||
| if (fmt->fields & FIELD_GATEWAY) | ||
| { | ||
| /* use same the logic as account */ |
There was a problem hiding this comment.
Given the reasoning for account to do this 1, I don't think it makes sense to copy that logic for gateway.
Closes #213.