X-Git-Url: http://git.pk910.de/?a=blobdiff_plain;f=src%2Fmodules%2FNeonServ.mod%2Fcmd_neonserv_nicklist.c;h=0fad5a84b522ab4ebec2e70f346f60d375828243;hb=HEAD;hp=129d79cae1216f311f2c866c86e949974f04a07b;hpb=417334131fa6e5edfc9379a16c40d71db37a97e7;p=NeonServV5.git diff --git a/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c b/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c index 129d79c..0fad5a8 100644 --- a/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c +++ b/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c @@ -66,7 +66,7 @@ CMD_BIND(neonserv_cmd_nicklist) { } struct neonserv_cmd_nicklist_cache *cache = malloc(sizeof(*cache)); if (!cache) { - perror("malloc() failed"); + printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__); return; } cache->client = client; @@ -129,7 +129,7 @@ static void neonserv_cmd_nicklist_async1(struct ClientSocket *client, struct Cli int chanuser_count; char statebuf[5]; char accessbuf[50]; - char viscountbuf[5]; + char viscountbuf[50]; int uaccess; i = 3; @@ -278,7 +278,10 @@ static void neonserv_cmd_nicklist_async1(struct ClientSocket *client, struct Cli accessbufpos += sprintf(accessbuf+accessbufpos, ")"); content[2] = accessbuf; if(flags & NEONSERV_CMD_NICKLIST_FLAG_VISCOUNT) { - sprintf(viscountbuf, "%d", chanuser->visCount); + if(chanuser->flags & CHANUSERFLAG_PARTING) + sprintf(viscountbuf, "%d (\003P\003 %d)", chanuser->visCount, chanuser->old_visCount); + else + sprintf(viscountbuf, "%d", chanuser->visCount); content[3] = viscountbuf; } table_add(table, content);