mirror of
https://github.com/ChronosX88/psyced.git
synced 2024-12-05 00:22:19 +00:00
ryuka asked for _offset in history to make a paginating client!
This commit is contained in:
parent
66626510e8
commit
034ad27ffd
@ -82,7 +82,7 @@ logClip(maxlen, cutlen) {
|
|||||||
// TODO: logView *since* timestamp. see also user.c:disconnected()
|
// TODO: logView *since* timestamp. see also user.c:disconnected()
|
||||||
//
|
//
|
||||||
// uh. vim lpc syntax file doesn't like default in variablenames. renamed.
|
// uh. vim lpc syntax file doesn't like default in variablenames. renamed.
|
||||||
logView(a, showingLog, defAmount) {
|
logView(a, showingLog, defAmount, offset) {
|
||||||
string grep;
|
string grep;
|
||||||
int i, ll;
|
int i, ll;
|
||||||
|
|
||||||
@ -141,6 +141,9 @@ logView(a, showingLog, defAmount) {
|
|||||||
P4(("\n%O :logView: %O\n", ME, _log))
|
P4(("\n%O :logView: %O\n", ME, _log))
|
||||||
unless (ll) ll = defAmount || 15;
|
unless (ll) ll = defAmount || 15;
|
||||||
ll *= 4;
|
ll *= 4;
|
||||||
|
/* FIXME: here's where the _offset parameter needs to be considered
|
||||||
|
* but let's see if ryuka is serious about wanting to use this ;)
|
||||||
|
*/
|
||||||
if (sizeof(_log) < ll) {
|
if (sizeof(_log) < ll) {
|
||||||
ll = sizeof(_log);
|
ll = sizeof(_log);
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -2468,7 +2468,7 @@ _request_history(source, mc, data, vars, b) {
|
|||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
logView(vars["_match"] || vars["_parameter"] || vars["_amount"],
|
logView(vars["_match"] || vars["_parameter"] || vars["_amount"],
|
||||||
source);
|
source, 0, vars["_offset"]);
|
||||||
sendmsg(source, "_echo_history"); // indicate end of history
|
sendmsg(source, "_echo_history"); // indicate end of history
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user