Skip to content

Commit a4ebfc3

Browse files
committed
Cleanup
1 parent da2ae1b commit a4ebfc3

File tree

5 files changed

+4
-7
lines changed

5 files changed

+4
-7
lines changed

src/mod/irc.mod/chan.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -2683,7 +2683,6 @@ static int gotnotice(char *from, char *msg)
26832683
char *ctcp, *code;
26842684
struct userrec *u;
26852685
struct chanset_t *chan;
2686-
memberlist *m;
26872686
int ignoring;
26882687

26892688
if (!strchr(CHANMETA "@", *msg))
@@ -2697,7 +2696,7 @@ static int gotnotice(char *from, char *msg)
26972696
fixcolon(msg);
26982697
strlcpy(uhost, from, sizeof buf);
26992698
nick = splitnick(&uhost);
2700-
u = lookup_user_record(get_all_chan_records(m), NULL, from); // TODO: get account from msgtags
2699+
u = lookup_user_record(find_member_from_nick(nick), NULL, from); // TODO: get account from msgtags
27012700
/* Check for CTCP: */
27022701
p = strchr(msg, 1);
27032702
while (p && *p) {

src/mod/module.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ typedef void (*chanout_butfunc)(int, int, const char *, ...) ATTRIBUTE_FORMAT(pr
524524
#define bind_bind_entry ((int(*)(tcl_bind_list_t *, const char *, const char *, const char *))global[320])
525525
#define unbind_bind_entry ((int(*)(tcl_bind_list_t *, const char *, const char *, const char *))global[321])
526526
#define argv0 ((char *)global[322])
527-
#define lookup_user_record ((struct userrec * (*)(memberlist *, const char *, const char *))global[323])
527+
#define lookup_user_record ((struct userrec * (*)(memberlist *, char *, char *))global[323])
528528
/* 324 - 327 */
529529
#define find_member_from_nick ((memberlist * (*) (char *))global[324])
530530

src/mod/server.mod/servmsg.c

-2
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,6 @@ static int gotmsg(char *from, char *msg)
559559
char *to, buf[UHOSTLEN], *nick, ctcpbuf[512], *uhost = buf, *ctcp,
560560
*p, *p1, *code;
561561
struct userrec *u;
562-
memberlist *m = NULL;
563562
int ctcp_count = 0;
564563
int ignoring;
565564

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

701699
/* Notice to a channel, not handled here */

src/userrec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ struct userrec *get_user_from_member(memberlist *m)
283283
* 'm->account' for the account, use the independent source variable 'account'
284284
* if available. This allows redundant checking in case of unexpected NULLs
285285
*/
286-
struct userrec *lookup_user_record(memberlist *m, const char *host, const char *account)
286+
struct userrec *lookup_user_record(memberlist *m, char *host, char *account)
287287
{
288288
struct userrec *u = NULL;
289289

src/users.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ struct userrec *get_user_by_host(char *);
185185
struct userrec *get_user_by_account(char *);
186186
struct userrec *get_user_by_nick(char *);
187187
struct userrec *get_user_from_member(memberlist *);
188-
struct userrec *lookup_user_record(memberlist *, const char *, const char *);
188+
struct userrec *lookup_user_record(memberlist *, char *, char *);
189189
struct userrec *check_chanlist(const char *);
190190
memberlist *find_member_from_nick(char *);
191191

0 commit comments

Comments
 (0)