summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/fe-text/lastlog.c11
-rw-r--r--src/fe-text/module-formats.c1
-rw-r--r--src/fe-text/module-formats.h1
3 files changed, 11 insertions, 2 deletions
diff --git a/src/fe-text/lastlog.c b/src/fe-text/lastlog.c
index e854fd9b..1602fdad 100644
--- a/src/fe-text/lastlog.c
+++ b/src/fe-text/lastlog.c
@@ -154,6 +154,13 @@ static void show_lastlog(const char *searchtext, GHashTable *optlist,
len = g_list_length(tmp);
}
+ if(g_hash_table_lookup(optlist, "count") != NULL) {
+ printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
+ TXT_LASTLOG_COUNT, len);
+ g_list_free(list);
+ return;
+ }
+
if (len > MAX_LINES_WITHOUT_FORCE && fhandle == -1 &&
g_hash_table_lookup(optlist, "force") == NULL) {
printformat_window(active_win, MSGLEVEL_CLIENTNOTICE,
@@ -206,7 +213,7 @@ static void show_lastlog(const char *searchtext, GHashTable *optlist,
}
/* SYNTAX: LASTLOG [-] [-file <filename>] [-clear] [-<level> -<level...>]
- [-new | -away] [-regexp | -word] [-case]
+ [-count] [-new | -away] [-regexp | -word] [-case]
[-window <ref#|name>] [<pattern>] [<count> [<start>]] */
static void cmd_lastlog(const char *data)
{
@@ -256,7 +263,7 @@ void lastlog_init(void)
{
command_bind("lastlog", NULL, (SIGNAL_FUNC) cmd_lastlog);
- command_set_options("lastlog", "!- force clear -file -window new away word regexp case");
+ command_set_options("lastlog", "!- force clear -file -window new away word regexp case count");
}
void lastlog_deinit(void)
diff --git a/src/fe-text/module-formats.c b/src/fe-text/module-formats.c
index 928d569a..afae7e79 100644
--- a/src/fe-text/module-formats.c
+++ b/src/fe-text/module-formats.c
@@ -26,6 +26,7 @@ FORMAT_REC gui_text_formats[] =
{ MODULE_NAME, "Text user interface", 0 },
{ "lastlog_too_long", "/LASTLOG would print $0 lines. If you really want to print all these lines use -force option.", 1, { 1 } },
+ { "lastlog_count", "{hilight Lastlog}: $0 lines", 1, { 1 } },
{ "lastlog_start", "{hilight Lastlog}:", 0 },
{ "lastlog_end", "{hilight End of Lastlog}", 0 },
diff --git a/src/fe-text/module-formats.h b/src/fe-text/module-formats.h
index e1f6e31f..eb8f3dff 100644
--- a/src/fe-text/module-formats.h
+++ b/src/fe-text/module-formats.h
@@ -4,6 +4,7 @@ enum {
TXT_MODULE_NAME,
TXT_LASTLOG_TOO_LONG,
+ TXT_LASTLOG_COUNT,
TXT_LASTLOG_START,
TXT_LASTLOG_END,