From svn w toxygen.net Sun Mar 1 21:19:45 2009 From: svn w toxygen.net (SVN commit) Date: Sun, 1 Mar 2009 21:19:45 +0100 (CET) Subject: [ekg2-commit] r4787 - trunk/contrib/patches: +trunk/contrib/patches/fix-mistaken-margin-left.diff Message-ID: <20090301201945.E8B7D17B1F@toxygen.net> Author: darkjames Date: 2009-03-01 21:19:44 +0100 (Sun, 01 Mar 2009) New Revision: 4787 Added: trunk/contrib/patches/fix-mistaken-margin-left.diff Log: This patch should fix bug in displaying messages containg /| It should broke nothing, but it isn't tested well (nobody care), so not commiting into trunk/; But commiting into contrib/patches/ to not forget about it. Added: trunk/contrib/patches/fix-mistaken-margin-left.diff =================================================================== --- trunk/contrib/patches/fix-mistaken-margin-left.diff (rev 0) +++ trunk/contrib/patches/fix-mistaken-margin-left.diff 2009-03-01 20:19:44 UTC (rev 4787) @@ -0,0 +1,42 @@ +Index: ekg/themes.c +=================================================================== +--- ekg/themes.c (wersja 4783) ++++ ekg/themes.c (kopia robocza) +@@ -466,6 +466,10 @@ + for (i = 0; i < fill_length; i++) + string_append_c(buf, fill_char); + } ++ } else if (*p == '/' && p[1] == '|' && (p == format || p[-1] != '/')) { /* match /| but don't match //| */ ++ /* this sequence is marking res->margin_left */ ++ string_append(buf, "\033[666m"); ++ p++; + } else + string_append_c(buf, *p); + p++; +@@ -613,6 +617,10 @@ + attr &= ~(FSTR_NORMAL+FSTR_BACKMASK); + attr |= (cur - 40) << 3; + } ++ ++ /* internal ekg2 sequence */ ++ if (cur == 666) ++ res->margin_left = j; + } + } + // else debug("Invalid/unsupported by ekg2 ECMA-48 CSI seq? (npar: %d)\n", npar); /* sequence not ended with m */ +@@ -622,15 +630,6 @@ + if (str[i] == 13) + continue; + +- if (str[i] == ('/') && str[i + 1] == ('|')) { +- if (i == 0 || str[i - 1] != ('/')) { +- res->margin_left = j; +- i++; +- continue; +- } +- continue; +- } +- + if (str[i] == 9) { + int k = 0, l = 8 - (j % 8); + From svn w toxygen.net Thu Mar 5 21:48:08 2009 From: svn w toxygen.net (SVN commit) Date: Thu, 5 Mar 2009 21:48:08 +0100 (CET) Subject: [ekg2-commit] r4788 - trunk/plugins/remote: trunk/plugins/remote/remote.c Message-ID: <20090305204808.9BEDE17B1F@toxygen.net> Author: darkjames Date: 2009-03-05 21:48:07 +0100 (Thu, 05 Mar 2009) New Revision: 4788 Modified: trunk/plugins/remote/remote.c Log: Add support for some fstring_t values. Modified: trunk/plugins/remote/remote.c =================================================================== --- trunk/plugins/remote/remote.c 2009-03-01 20:19:44 UTC (rev 4787) +++ trunk/plugins/remote/remote.c 2009-03-05 20:48:07 UTC (rev 4788) @@ -181,6 +181,9 @@ asc = string_init(NULL); + if (fstr->prompt_empty) + string_append(asc, "%]"); + for (i = 0; str[i]; i++) { #define prev attr[i-1] #define cur attr[i] @@ -193,7 +196,11 @@ if (!(cur & FSTR_REVERSE) && (prev & FSTR_REVERSE)) reset = 1; if ((cur & FSTR_NORMAL) && !(prev & FSTR_NORMAL)) reset = 1; /* colors disappear */ - if (reset) + /* XXX, fstr->margin_left */ + if (fstr->prompt_len == i) { + string_append(asc, "%|"); + reset = 1; + } else if (reset) string_append(asc, "%n"); } else reset = 1; From svn w toxygen.net Tue Mar 10 21:54:34 2009 From: svn w toxygen.net (SVN commit) Date: Tue, 10 Mar 2009 21:54:34 +0100 (CET) Subject: [ekg2-commit] r4789 - trunk/plugins/jabber: trunk/plugins/jabber/jabber_handlers.c Message-ID: <20090310205434.F361817B1F@toxygen.net> Author: darkjames Date: 2009-03-10 21:54:33 +0100 (Tue, 10 Mar 2009) New Revision: 4789 Modified: trunk/plugins/jabber/jabber_handlers.c Log: Small fix for jabber auto_auth: always mark user for authorization (if we won't do so, we get ugly message) Modified: trunk/plugins/jabber/jabber_handlers.c =================================================================== --- trunk/plugins/jabber/jabber_handlers.c 2009-03-05 20:48:07 UTC (rev 4788) +++ trunk/plugins/jabber/jabber_handlers.c 2009-03-10 20:54:33 UTC (rev 4789) @@ -1412,10 +1412,27 @@ xfree(jid); if (from && !xstrcmp(type, "subscribe")) { - int auto_auth = session_int_get(s, "auto_auth"); + userlist_t *u; + jabber_userlist_private_t *up; - if (auto_auth == -1) + int auto_auth; + + if ((auto_auth = session_int_get(s, "auto_auth")) == -1) auto_auth = 0; + + if (!(u = userlist_find(s, uid))) { + u = userlist_add(s, uid, NULL); + ekg_group_add(u, "__authreq"); + } + + up = jabber_userlist_priv_get(u); + if ((up->authtype & EKG_JABBER_AUTH_FROM)) { /* XXX: maybe just auto-auth? */ + debug_error("[jabber] subscribe req for already subscribed uid (%s), authtype=%d, wtf?\n", + uid, up->authtype); + up->authtype &= ~EKG_JABBER_AUTH_FROM; + } + up->authtype |= EKG_JABBER_AUTH_REQ; + if ((auto_auth & 1)) { if (!(auto_auth & 4)) /* auto-accept */ command_exec_format(NULL, s, 2, "/auth --accept %s", uid); @@ -1423,20 +1440,6 @@ } else if ((auto_auth & 4)) /* auto-deny */ command_exec_format(NULL, s, 2, "/auth --deny %s", uid); else { /* ask */ - userlist_t *u = userlist_find(s, uid); - if (!u) { - u = userlist_add(s, uid, NULL); - ekg_group_add(u, "__authreq"); - } - - jabber_userlist_private_t *up = jabber_userlist_priv_get(u); - if ((up->authtype & EKG_JABBER_AUTH_FROM)) { /* XXX: maybe just auto-auth? */ - debug_error("[jabber] subscribe req for already subscribed uid (%s), authtype=%d, wtf?\n", - uid, up->authtype); - up->authtype &= ~EKG_JABBER_AUTH_FROM; - } - up->authtype |= EKG_JABBER_AUTH_REQ; - print("jabber_auth_subscribe", uid, session_name(s)); } xfree(uid); From svn w toxygen.net Sun Mar 22 14:02:23 2009 From: svn w toxygen.net (SVN commit) Date: Sun, 22 Mar 2009 14:02:23 +0100 (CET) Subject: [ekg2-commit] r4790 - trunk/plugins/ncurses: trunk/plugins/ncurses/old.c Message-ID: <20090322130223.A03E817B1F@toxygen.net> Author: peres Date: 2009-03-22 14:02:22 +0100 (Sun, 22 Mar 2009) New Revision: 4790 Modified: trunk/plugins/ncurses/old.c Log: When we're in noecho mode (password input), we don't need to care about input space and prompt can get much longer. This should fix #18. Modified: trunk/plugins/ncurses/old.c =================================================================== --- trunk/plugins/ncurses/old.c 2009-03-10 20:54:33 UTC (rev 4789) +++ trunk/plugins/ncurses/old.c 2009-03-22 13:02:22 UTC (rev 4790) @@ -305,7 +305,8 @@ if (!n) return; - const int maxlen = (n->window && n->window->_maxx ? n->window->_maxx : 80) / 3; + const int _maxlen = n->window && n->window->_maxx ? n->window->_maxx : 80; + const int maxlen = ncurses_noecho ? _maxlen - 3 : _maxlen / 3; xfree(n->prompt_real); if (maxlen <= 6) /* we assume the terminal is too narrow to display any input with prompt */ From svn w toxygen.net Fri Mar 27 22:52:44 2009 From: svn w toxygen.net (SVN commit) Date: Fri, 27 Mar 2009 22:52:44 +0100 (CET) Subject: [ekg2-commit] r4791 - trunk/remote: trunk/remote/ekg-remote.c Message-ID: <20090327215244.5D94B17B3A@toxygen.net> Author: darkjames Date: 2009-03-27 22:52:43 +0100 (Fri, 27 Mar 2009) New Revision: 4791 Modified: trunk/remote/ekg-remote.c Log: Make -T usage more clear. Modified: trunk/remote/ekg-remote.c =================================================================== --- trunk/remote/ekg-remote.c 2009-03-22 13:02:22 UTC (rev 4790) +++ trunk/remote/ekg-remote.c 2009-03-27 21:52:43 UTC (rev 4791) @@ -480,6 +480,9 @@ switch (c) { case 'T': testonly = 1; + frontend = optarg; + break; + case 'F': frontend = optarg; break;