Mercurial > hg > nnchat
comparison nnchat.c @ 301:388c22d6ab44
Closing PRV buffers should not depend on the user being in the internal userlist. Fixed.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 11 Jun 2011 04:30:54 +0300 |
parents | 0119bcc15f15 |
children | 859578ec3275 |
comparison
equal
deleted
inserted
replaced
300:28adb25ca530 | 301:388c22d6ab44 |
---|---|
887 return 0; | 887 return 0; |
888 } | 888 } |
889 else if (!strncasecmp(buf, "/close", 6)) { | 889 else if (!strncasecmp(buf, "/close", 6)) { |
890 char *name = trimLeft(buf + 6); | 890 char *name = trimLeft(buf + 6); |
891 if (strlen(name) > 0) { | 891 if (strlen(name) > 0) { |
892 nn_user_t *user = nn_user_find(nnUsers, name); | 892 nn_window_t *win = nn_find_window(name); |
893 if (user != NULL) { | 893 if (win != NULL) { |
894 nn_window_t *win = nn_find_window(user->name); | |
895 closeWindow(win); | 894 closeWindow(win); |
896 } else { | 895 } else { |
897 printMsg(currWin, "No PRV query by name '%s'.\n", name); | 896 printMsg(currWin, "No PRV query by name '%s'.\n", name); |
898 } | 897 } |
899 } else { | 898 } else { |