Kod: Kodu kopyalamak için üzerine çift tıklayın!
/*************************************************************************/
static int access_list(User *u, int index, ChannelInfo *ci, int *sent_header)
{
ChanAccess *access = &ci->access[index];
NickGroupInfo *ngi;
if (!access->nickgroup)
return RET_NOENTRY;
if (!(ngi = get_ngi_id(access->nickgroup)))
return RET_INTERR;
if (!*sent_header) {
notice_lang(s_ChanServ, u, CHAN_ACCESS_LIST_HEADER, ci->name);
*sent_header = 1;
}
if (access->kabul==0)
notice_lang(s_ChanServ, u, CHAN_ACCESS_LIST_FORMAT,
index+1, access->level, ngi_mainnick(ngi), "<Beklemede>");
else if (access->kabul==1)
notice_lang(s_ChanServ, u, CHAN_ACCESS_LIST_FORMAT,
index+1, access->level, ngi_mainnick(ngi), "<Kabul Edildi>");
return RET_LISTED;
}
static int access_list_callback(User *u, int num, va_list args)
{
ChannelInfo *ci = va_arg(args, ChannelInfo *);
int *sent_header = va_arg(args, int *);
if (num < 1 || num > ci->access_count)
return 0;
return access_list(u, num-1, ci, sent_header) > 0;
}