Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix user/chanrecord checking on join #1678

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/mod/irc.mod/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,11 +2035,10 @@ static int gotjoin(char *from, char *channame)
reset_chan_info(chan, CHAN_RESETALL, 1);
} else {
m = ismember(chan, nick);
u = lookup_user_record(m, account ? account : NULL, from);
get_user_flagrec(u, &fr, chan->dname);
if (m && m->split && !strcasecmp(m->userhost, uhost)) {
u = get_user_from_member(m);
get_user_flagrec(u, &fr, chan->dname);
check_tcl_rejn(nick, uhost, u, chan->dname);

chan = findchan(chname);
if (!chan) {
if (ch_dname)
Expand All @@ -2057,6 +2056,7 @@ static int gotjoin(char *from, char *channame)
m->last = now;
m->delay = 0L;
m->flags = (chan_hasop(m) ? WASOP : 0) | (chan_hashalfop(m) ? WASHALFOP : 0);
m->user = u;
set_handle_laston(chan->dname, u, now);
m->flags |= STOPWHO;
putlog(LOG_JOIN, chan->dname, "%s (%s) returned to %s.", nick, uhost,
Expand All @@ -2072,6 +2072,7 @@ static int gotjoin(char *from, char *channame)
m->delay = 0L;
strlcpy(m->nick, nick, sizeof m->nick);
strlcpy(m->userhost, uhost, sizeof m->userhost);
m->user = u;
m->flags |= STOPWHO;

if (extjoin) {
Expand All @@ -2093,9 +2094,6 @@ static int gotjoin(char *from, char *channame)
goto exit;
}

/* The record saved in the channel record always gets updated,
* so we can use that. */

if (match_my_nick(nick)) {
/* It was me joining! Need to update the channel record with the
* unique name for the channel (as the server see's it). <cybah>
Expand Down