|
|
@@ -1222,7 +1222,7 @@ static void check_this_member(struct chanset_t *chan, char *nick, struct flag_re
|
|
|
(!loading && userlist && chan_bitch(chan) && !chk_op(*fr, chan)) ) ) {
|
|
|
/* if (target_priority(chan, m, 1)) */
|
|
|
add_mode(chan, '-', 'o', m->nick);
|
|
|
- } else if (!chan_hasop(m) && dovoice(chan) && m->user && !u_pass_match(m->user, "-") && chk_autoop(*fr, chan)) {
|
|
|
+ } else if (!chan_hasop(m) && (chan->role & ROLE_OP) && m->user && !u_pass_match(m->user, "-") && chk_autoop(*fr, chan)) {
|
|
|
do_op(m->nick, chan, 1, 0);
|
|
|
}
|
|
|
if (dovoice(chan)) {
|
|
|
@@ -1787,7 +1787,7 @@ static int got710(char *from, char *msg)
|
|
|
|
|
|
chan = findchan(chname);
|
|
|
|
|
|
- if (!chan->knock_flags || !dovoice(chan))
|
|
|
+ if (!chan->knock_flags || !(chan->role & ROLE_INVITE))
|
|
|
return 0;
|
|
|
|
|
|
struct userrec *u = get_user_by_host(uhost);
|
|
|
@@ -2884,17 +2884,15 @@ static int gotjoin(char *from, char *chname)
|
|
|
}
|
|
|
#endif /* CACHE */
|
|
|
if (!splitjoin) {
|
|
|
- bool common_checks = dovoice(chan) && !glob_bot(fr);
|
|
|
-
|
|
|
/* Autoop */
|
|
|
if (!chan_hasop(m) &&
|
|
|
(op ||
|
|
|
- (common_checks && !u_pass_match(m->user, "-") && chk_autoop(fr, chan)))) {
|
|
|
+ ((chan->role & ROLE_OP) && !glob_bot(fr) && !u_pass_match(m->user, "-") && chk_autoop(fr, chan)))) {
|
|
|
do_op(m->nick, chan, 1, 0);
|
|
|
}
|
|
|
|
|
|
/* +v or +voice */
|
|
|
- if (!chan_hasvoice(m) && common_checks) {
|
|
|
+ if (!chan_hasvoice(m) && !glob_bot(fr) && dovoice(chan)) {
|
|
|
if (m->user) {
|
|
|
if (!(m->flags & EVOICE) &&
|
|
|
(
|