I am using anope services (ChanServ, NickServ... etc) www.anope.org on my IRC network (bahamut-1.8.3) and wanted to modify their accest lists so that they also show ip address infront of nicknames, the last seen ip address of that registered nick, like DALnet has in their aop/sop/akick lists.
I modified the following code:
Code: Select all
static int xop_list(User * u, int index, ChannelInfo * ci, int *sent_header,
int xlev, int xmsg) {
ChanAccess *access = &ci->access[index];
NickAlias *na;
if (!access->in_use || access->level != xlev)
return 0;
if (!*sent_header) {
notice_lang(s_ChanServ, u, xmsg, ci->name);
*sent_header = 1;
}
notice_lang(s_ChanServ, u, CHAN_XOP_LIST_FORMAT, index + 1,
access->nc->display, na->last_usermask);
return 1;
}
Code: Select all
static int xop_list(User * u, int index, ChannelInfo * ci,
int *sent_header, int xlev, int xmsg)
{
NickCore *nc;
ChanAccess *access = &ci->access[index];
NickAlias *na = findnick(nc->display);
if (!access->in_use || access->level != xlev) {
return 0;
}
if (!*sent_header) {
notice_lang(s_ChanServ, u, xmsg, ci->name);
*sent_header = 1;
}
if (!(access->nc->na->last_usermask)) {
notice_lang(s_ChanServ, u, CHAN_XOP_LIST_FORMAT, index + 1,
access->nc->display, "(no record for userhost has been found)");
}
else {
notice_lang(s_ChanServ, u, CHAN_XOP_LIST_FORMAT, index + 1,
access->nc->na->last_usermask);
}
return 1;
}
This is the generated error by the compiler:
If anyone is aware of this network services and know's C, I would really appreciate if you could help me out here, especially in these pointers.$ make
sh version.sh
gcc -O2 -Wall -g -c chanserv.c
chanserv.c: In function `xop_list':
chanserv.c structure has no member named `na'
chanserv.c structure has no member named `na'
chanserv.c warning: unused variable `na'
chanserv.c warning: `nc' might be used uninitialized in this function
*** Error code 1