projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new multi log system
[NeonServV5.git]
/
src
/
modules
/
NeonServ.mod
/
cmd_neonserv_nicklist.c
diff --git
a/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c
b/src/modules/NeonServ.mod/cmd_neonserv_nicklist.c
index 1287ad6c993ba8714738c64dc3b6b2d4b73e30d2..0fad5a84b522ab4ebec2e70f346f60d375828243 100644
(file)
--- a/
src/modules/NeonServ.mod/cmd_neonserv_nicklist.c
+++ b/
src/modules/NeonServ.mod/cmd_neonserv_nicklist.c
@@
-1,4
+1,4
@@
-/* cmd_neonserv_nicklist.c - NeonServ v5.
5
+/* cmd_neonserv_nicklist.c - NeonServ v5.
6
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
* Copyright (C) 2011-2012 Philipp Kreil (pk910)
*
* This program is free software: you can redistribute it and/or modify
@@
-66,7
+66,7
@@
CMD_BIND(neonserv_cmd_nicklist) {
}
struct neonserv_cmd_nicklist_cache *cache = malloc(sizeof(*cache));
if (!cache) {
}
struct neonserv_cmd_nicklist_cache *cache = malloc(sizeof(*cache));
if (!cache) {
- p
error("malloc() failed"
);
+ p
rintf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__
);
return;
}
cache->client = client;
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];
int chanuser_count;
char statebuf[5];
char accessbuf[50];
- char viscountbuf[5];
+ char viscountbuf[5
0
];
int uaccess;
i = 3;
int uaccess;
i = 3;
@@
-241,7
+241,10
@@
static void neonserv_cmd_nicklist_async1(struct ClientSocket *client, struct Cli
}
} else {
synced_user = 1;
}
} else {
synced_user = 1;
- accessbufpos = sprintf(accessbuf, "\003040\003");
+ if(((chanuser->flags & CHANUSERFLAG_OPPED) && db_enfops > uaccess) || ((chanuser->flags & CHANUSERFLAG_VOICED) && db_enfvoice > uaccess))
+ accessbufpos = sprintf(accessbuf, "\003040\003");
+ else
+ accessbufpos = sprintf(accessbuf, "0");
}
} else if(!uaccess)
accessbufpos = sprintf(accessbuf, "0");
}
} else if(!uaccess)
accessbufpos = sprintf(accessbuf, "0");
@@
-275,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) {
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);
content[3] = viscountbuf;
}
table_add(table, content);