# HG changeset patch # User Matti Hamalainen # Date 1307752762 -10800 # Node ID ff39ebf05b40d92a00cceed793d1fc719eeef553 # Parent 90dd26f5918a888b289bf0d6e5f298c7a0067adc Fix unwindowed PRVs. diff -r 90dd26f5918a -r ff39ebf05b40 nnchat.c --- a/nnchat.c Sat Jun 11 03:18:29 2011 +0300 +++ b/nnchat.c Sat Jun 11 03:39:22 2011 +0300 @@ -620,7 +620,9 @@ t = nn_strip_tags(s + 1); if (!strncmp(t, "BPRV ", 5)) { - char *name, *tmp, *msg; + char *name, *tmp, *msg, *h; + nn_window_t *win; + h = nn_decode_str2(t + 1); if (!strncmp(t, "BPRV from ", 10)) { name = nn_decode_str2(t + 10); @@ -638,8 +640,14 @@ *tmp = 0; isIgnored = setIgnoreMode && checkIgnoreList(name); - - printMsgQ(nn_find_window(name), isIgnored, "½5½<½%d½%s½5½>½0½ %s\n", isMine ? 14 : 15, isMine ? optUserName : name, msg); + win = nn_find_window(name); + + if (win != NULL) + printMsgQ(win, isIgnored, "½5½<½%d½%s½5½>½0½ %s\n", isMine ? 14 : 15, isMine ? optUserName : name, msg); + else + printMsgQ(NULL, isIgnored, "½11½%s½0½\n", h); + + th_free(h); } else { /* It's an action (/me) */ char *h = nn_decode_str2(t);