if (EmptyString(name) || EmptyString(password))
return need_more_params(sptr, "OPER");
- aconf = find_conf_exact(name, cli_username(sptr), cli_sockhost(sptr), CONF_OPS);
+ aconf = find_conf_exact(name, cli_username(sptr), cli_sockhost(sptr), CONF_OPERATOR);
if (!aconf)
aconf = find_conf_exact(name, cli_username(sptr),
- ircd_ntoa((const char*) &(cli_ip(cptr))), CONF_OPS);
+ ircd_ntoa((const char*) &(cli_ip(cptr))), CONF_OPERATOR);
if (!aconf || IsIllegal(aconf))
{
parv[0], cli_user(sptr)->username, cli_sockhost(sptr));
return 0;
}
- assert(0 != (aconf->status & CONF_OPS));
+ assert(0 != (aconf->status & CONF_OPERATOR));
if (oper_password_match(password, aconf->passwd))
{
cli_sockhost(sptr));
return 0;
}
- if (CONF_LOCOP == aconf->status) {
- ClearOper(sptr);
- SetLocOp(sptr);
- }
- else {
- /*
- * prevent someone from being both oper and local oper
- */
+ SetLocOp(sptr);
+ client_set_privs(sptr, aconf);
+ if (HasPriv(sptr, PRIV_PROPAGATE))
+ {
ClearLocOp(sptr);
SetOper(sptr);
++UserStats.opers;
SetFlag(sptr, FLAG_DEBUG);
set_snomask(sptr, SNO_OPERDEFAULT, SNO_ADD);
- client_set_privs(sptr, aconf);
cli_max_sendq(sptr) = 0; /* Get the sendq from the oper's class */
send_umode_out(cptr, sptr, &old_mode, HasPriv(sptr, PRIV_PROPAGATE));
send_reply(sptr, RPL_YOUREOPER);