1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

/LASTLOG -count option added. patch by dgl@dgl.cx

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1850 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-10-19 11:59:27 +00:00 committed by cras
parent b9cdd10a86
commit 7d7b5e380e
3 changed files with 11 additions and 2 deletions

View File

@ -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)

View File

@ -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 },

View File

@ -4,6 +4,7 @@ enum {
TXT_MODULE_NAME,
TXT_LASTLOG_TOO_LONG,
TXT_LASTLOG_COUNT,
TXT_LASTLOG_START,
TXT_LASTLOG_END,