Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thommey committed Jun 29, 2024
1 parent da2ae1b commit a4ebfc3
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/mod/irc.mod/chan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2683,7 +2683,6 @@ static int gotnotice(char *from, char *msg)
char *ctcp, *code;
struct userrec *u;
struct chanset_t *chan;
memberlist *m;
int ignoring;

if (!strchr(CHANMETA "@", *msg))
Expand All @@ -2697,7 +2696,7 @@ static int gotnotice(char *from, char *msg)
fixcolon(msg);
strlcpy(uhost, from, sizeof buf);
nick = splitnick(&uhost);
u = lookup_user_record(get_all_chan_records(m), NULL, from); // TODO: get account from msgtags
u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags
/* Check for CTCP: */
p = strchr(msg, 1);
while (p && *p) {
Expand Down
2 changes: 1 addition & 1 deletion src/mod/module.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr
#define bind_bind_entry ((int(*)(tcl_bind_list_t *, const char *, const char *, const char *))global[320])
#define unbind_bind_entry ((int(*)(tcl_bind_list_t *, const char *, const char *, const char *))global[321])
#define argv0 ((char *)global[322])
#define lookup_user_record ((struct userrec * (*)(memberlist *, const char *, const char *))global[323])
#define lookup_user_record ((struct userrec * (*)(memberlist *, char *, char *))global[323])
/* 324 - 327 */
#define find_member_from_nick ((memberlist * (*) (char *))global[324])

Expand Down
2 changes: 0 additions & 2 deletions src/mod/server.mod/servmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,6 @@ static int gotmsg(char *from, char *msg)
char *to, buf[UHOSTLEN], *nick, ctcpbuf[512], *uhost = buf, *ctcp,
*p, *p1, *code;
struct userrec *u;
memberlist *m = NULL;
int ctcp_count = 0;
int ignoring;

Expand Down Expand Up @@ -695,7 +694,6 @@ static int gotnotice(char *from, char *msg)
{
char *to, *nick, ctcpbuf[512], *p, *p1, buf[512], *uhost = buf, *ctcp;
struct userrec *u;
memberlist *m;
int ignoring;

/* Notice to a channel, not handled here */
Expand Down
2 changes: 1 addition & 1 deletion src/userrec.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct userrec *get_user_from_member(memberlist *m)
* 'm->account' for the account, use the independent source variable 'account'
* if available. This allows redundant checking in case of unexpected NULLs
*/
struct userrec *lookup_user_record(memberlist *m, const char *host, const char *account)
struct userrec *lookup_user_record(memberlist *m, char *host, char *account)
{
struct userrec *u = NULL;

Expand Down
2 changes: 1 addition & 1 deletion src/users.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct userrec *get_user_by_host(char *);
struct userrec *get_user_by_account(char *);
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 *lookup_user_record(memberlist *, char *, char *);
struct userrec *check_chanlist(const char *);
memberlist *find_member_from_nick(char *);

Expand Down

0 comments on commit a4ebfc3

Please sign in to comment.