diff --git a/src/mod/irc.mod/chan.c b/src/mod/irc.mod/chan.c index d9a25ef1d..16883a0ba 100644 --- a/src/mod/irc.mod/chan.c +++ b/src/mod/irc.mod/chan.c @@ -2080,7 +2080,7 @@ static int gotjoin(char *from, char *channame) goto exit; } } else { - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags } check_tcl_join(nick, uhost, u, chan->dname); @@ -2604,7 +2604,7 @@ static int gotmsg(char *from, char *msg) ctcp_count++; if (ctcp[0] != ' ') { code = newsplit(&ctcp); - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags if (!ignoring || trigger_on_ignore) { if (!check_tcl_ctcp(nick, uhost, u, to, code, ctcp)) { chan = findchan(realto); diff --git a/src/mod/irc.mod/irc.c b/src/mod/irc.mod/irc.c index 47a9d80c1..bc3f578e4 100644 --- a/src/mod/irc.mod/irc.c +++ b/src/mod/irc.mod/irc.c @@ -918,7 +918,7 @@ static int check_tcl_pub(char *nick, char *from, char *chname, char *msg) simple_sprintf(host, "%s!%s", nick, from); chan = findchan(chname); m = ismember(chan, nick); - u = lookup_user_record(m ? m : check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(m ? m : find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags hand = u ? u->handle : "*"; get_user_flagrec(u, &fr, chname); Tcl_SetVar(interp, "_pub1", nick, 0); @@ -948,7 +948,7 @@ static int check_tcl_pubm(char *nick, char *from, char *chname, char *msg) simple_sprintf(host, "%s!%s", nick, from); chan = findchan(chname); m = ismember(chan, nick); - u = lookup_user_record(m ? m : check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(m ? m : find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags get_user_flagrec(u, &fr, chname); Tcl_SetVar(interp, "_pubm1", nick, 0); Tcl_SetVar(interp, "_pubm2", from, 0); diff --git a/src/mod/module.h b/src/mod/module.h index eb5d0eb82..63075575a 100644 --- a/src/mod/module.h +++ b/src/mod/module.h @@ -526,7 +526,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr #define argv0 ((char *)global[322]) #define lookup_user_record ((struct userrec * (*)(memberlist *, const char *, const char *))global[323]) /* 324 - 327 */ -#define check_all_chan_records ((memberlist * (*) (char *))global[324]) +#define find_member_from_nick ((memberlist * (*) (char *))global[324]) /* hostmasking */ diff --git a/src/mod/server.mod/servmsg.c b/src/mod/server.mod/servmsg.c index a8eae8139..07b3daf01 100644 --- a/src/mod/server.mod/servmsg.c +++ b/src/mod/server.mod/servmsg.c @@ -608,7 +608,7 @@ static int gotmsg(char *from, char *msg) putlog(LOG_PUBLIC, to, "CTCP %s: %s from %s (%s) to %s", code, ctcp, nick, uhost, to); } else { - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags if (!ignoring || trigger_on_ignore) { if (!check_tcl_ctcp(nick, uhost, u, to, code, ctcp) && !ignoring) { if ((lowercase_ctcp && !strcasecmp(code, "DCC")) || @@ -671,7 +671,7 @@ static int gotmsg(char *from, char *msg) } detect_flood(nick, uhost, from, FLOOD_PRIVMSG); - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags code = newsplit(&msg); rmspace(msg); @@ -732,7 +732,7 @@ static int gotnotice(char *from, char *msg) "CTCP reply %s: %s from %s (%s) to %s", code, ctcp, nick, uhost, to); } else { - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags if (!ignoring || trigger_on_ignore) { check_tcl_ctcr(nick, uhost, u, to, code, ctcp); if (!ignoring) @@ -768,7 +768,7 @@ static int gotnotice(char *from, char *msg) } detect_flood(nick, uhost, from, FLOOD_NOTICE); - u = lookup_user_record(check_all_chan_records(nick), NULL, from); // TODO: get account from msgtags + u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags if (!ignoring || trigger_on_ignore) if (check_tcl_notc(nick, uhost, u, botname, msg) == 2) diff --git a/src/modules.c b/src/modules.c index e64d335b4..b2ebf37ae 100644 --- a/src/modules.c +++ b/src/modules.c @@ -629,7 +629,7 @@ Function global_table[] = { (Function) & argv0, (Function) lookup_user_record, /* 324 - 327 */ - (Function) check_all_chan_records + (Function) find_member_from_nick }; void init_modules(void) diff --git a/src/userrec.c b/src/userrec.c index fccb3d08b..8e4132246 100644 --- a/src/userrec.c +++ b/src/userrec.c @@ -174,7 +174,7 @@ static struct userrec *check_dcclist_hand(char *handle) /* Search every channel record for the provided nickname. Used in cases where * we are searching for a user record but don't have a memberlist to start from */ -memberlist *check_all_chan_records(char *nick) { +memberlist *find_member_from_nick(char *nick) { struct chanset_t *chan; memberlist *m = NULL; diff --git a/src/users.h b/src/users.h index f98c83463..79b2e930f 100644 --- a/src/users.h +++ b/src/users.h @@ -187,7 +187,7 @@ struct userrec *get_user_by_nick(char *); struct userrec *get_user_from_member(memberlist *); struct userrec *lookup_user_record(memberlist *, const char *, const char *); struct userrec *check_chanlist(const char *); -memberlist *check_all_chan_records(char *); +memberlist *find_member_from_nick(char *); /* All the default userentry stuff, for code re-use */