{
unsigned short port;
unsigned short tmpport;
- const char* crule_name;
+ const char* rule;
struct ConfItem* aconf;
struct Client* acptr;
struct Jupe* ajupe;
* are ored together. Oper connects are effected only by D
* lines (CRULEALL) not d lines (CRULEAUTO).
*/
- if ((crule_name = conf_eval_crule(aconf))) {
- sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Disallowed by rule: %s",
- sptr, crule_name);
+ if ((rule = conf_eval_crule(aconf->name, CRULE_ALL))) {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Disallowed by rule: %s", sptr, rule);
return 0;
}
/*
{
unsigned short port;
unsigned short tmpport;
- const char* crule_name;
+ const char* rule;
struct ConfItem* aconf;
struct Client* acptr;
struct Jupe* ajupe;
* are ored together. Oper connects are effected only by D
* lines (CRULEALL) not d lines (CRULEAUTO).
*/
- if ((crule_name = conf_eval_crule(aconf))) {
- sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Disallowed by rule: %s",
- sptr, crule_name);
+ if ((rule = conf_eval_crule(aconf->name, CRULE_ALL))) {
+ sendcmdto_one(&me, CMD_NOTICE, sptr, "%C :Connect: Disallowed by rule: %s", sptr, rule);
return 0;
}
/*
struct ConfItem* cconf;
struct Client* acptr;
struct Jupe* ajupe;
+ const char* rule;
if (!IsPrivileged(sptr)) {
sendto_one(sptr, err_str(ERR_NOPRIVILEGES), me.name, parv[0]); /* XXX DEAD */
* are ored together. Oper connects are effected only by D
* lines (CRULEALL) not d lines (CRULEAUTO).
*/
- for (cconf = GlobalConfList; cconf; cconf = cconf->next) {
- if ((CONF_CRULEALL == cconf->status) &&
- (0 == match(cconf->host, aconf->name))) {
- if (crule_eval(cconf->passwd)) {
- if (MyUser(sptr))
- sendto_one(sptr, ":%s NOTICE %s :Connect: Disallowed by rule: %s", /* XXX DEAD */
- me.name, parv[0], cconf->name);
- else
- sendto_one(sptr, "%s NOTICE %s%s :Connect: Disallowed by rule: %s", /* XXX DEAD */
- NumServ(&me), NumNick(sptr), cconf->name);
- return 0;
- }
- }
+ if ((rule = conf_eval_crule(aconf->name, CRULE_ALL))) {
+ if (MyUser(sptr))
+ sendto_one(sptr, ":%s NOTICE %s :Connect: Disallowed by rule: %s", /* XXX DEAD */
+ me.name, parv[0], cconf->name);
+ else
+ sendto_one(sptr, "%s NOTICE %s%s :Connect: Disallowed by rule: %s", /* XXX DEAD */
+ NumServ(&me), NumNick(sptr), cconf->name);
+ return 0;
}
/*
* Check to see if the server is juped; if it is, disallow the connect