[mw-devel] [Git][arthur/mw][master] 2 commits: Attempt to remove pid from wholist
Imran Hussain
imranh at sucs.org
Sat Feb 27 18:36:30 GMT 2016
Imran Hussain pushed to branch master at Justin Mitchell / mw
Commits:
a0896b3b by Imran Hussain at 2016-02-27T18:12:54+00:00
Attempt to remove pid from wholist
- - - - -
aa185482 by Imran Hussain at 2016-02-27T18:32:04+00:00
Make formatting nicer
- - - - -
1 changed file:
- src/client/who.c
Changes:
=====================================
src/client/who.c
=====================================
--- a/src/client/who.c
+++ b/src/client/who.c
@@ -78,7 +78,7 @@ void display_wholist(int mode)
if (mode == 1)
format_message("\nUser status...");
else
- format_message("\nPID %-*s %-*s Idle What...",NAMESIZE,"Name",20,"RealName");
+ format_message("\n %-*s %-*s Idle What...",NAMESIZE,"Name",20,"RealName");
_autofree char *divider = NULL;
for (int i = 0; i < screen_w(); i++) string_add(÷r, "-");
@@ -87,7 +87,6 @@ void display_wholist(int mode)
size_t wi;
json_t *entry;
json_array_foreach(whoinfo, wi, entry) {
- int pid = json_getint(entry, "pid");
const char *name = json_getstring(entry, "name");
const char *realname = json_getstring(entry, "realname");
time_t dowhen = json_getint(entry, "dowhen");
@@ -108,7 +107,7 @@ void display_wholist(int mode)
if (json_getint(perms, "wizchat") > 0) chat='*';
- format_message("%-5d %c%-*s %-20.20s %6s Room %d (%s,%s,%s)\033--",pid,chat,NAMESIZE,name,realname,itime(now-idletime),channel, chatmode, prot, chatprivs);
+ format_message("%c%-*s %-20.20s %6s Room %d (%s,%s,%s)\033--",chat,NAMESIZE,name,realname,itime(now-idletime),channel, chatmode, prot, chatprivs);
}
}
format_message("%s", divider);
View it on GitLab: https://projects.sucs.org/arthur/mw/compare/faf39683c0eae53cfc7434829069373218fa85ab...aa185482267f401203c9fba994bbba2ec7c257d7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20160227/947428fd/attachment.html>
More information about the mw-devel
mailing list