From 2654c50820eefaa73eae08c0376a00a56d07e258 Mon Sep 17 00:00:00 2001 From: "psyc://psyced.org/~lynX" Date: Fri, 8 May 2015 02:11:28 +0200 Subject: [PATCH] this is where ryuka can have paginated history for neat clients --- world/net/lastlog.c | 5 ++++- world/net/place/archetype.gen | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/world/net/lastlog.c b/world/net/lastlog.c index bcd81a5..6360857 100644 --- a/world/net/lastlog.c +++ b/world/net/lastlog.c @@ -82,7 +82,7 @@ logClip(maxlen, cutlen) { // TODO: logView *since* timestamp. see also user.c:disconnected() // // uh. vim lpc syntax file doesn't like default in variablenames. renamed. -logView(a, showingLog, defAmount) { +logView(a, showingLog, defAmount, offset) { string grep; int i, ll; @@ -141,6 +141,9 @@ logView(a, showingLog, defAmount) { P4(("\n%O :logView: %O\n", ME, _log)) unless (ll) ll = defAmount || 15; 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) { ll = sizeof(_log); i = 0; diff --git a/world/net/place/archetype.gen b/world/net/place/archetype.gen index 5daa290..3f6c3b8 100644 --- a/world/net/place/archetype.gen +++ b/world/net/place/archetype.gen @@ -2468,7 +2468,7 @@ _request_history(source, mc, data, vars, b) { # endif # endif logView(vars["_match"] || vars["_parameter"] || vars["_amount"], - source); + source, 0, vars["_offset"]); sendmsg(source, "_echo_history"); // indicate end of history return 1; }