More tab completion: /DISCONNECT, /SERVER ADD|REMOVE, /STATS

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2954 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-10-14 16:12:01 +00:00 committed by cras
commit fb5c4c8037
5 changed files with 108 additions and 1 deletions

View file

@ -25,6 +25,7 @@ real_sources = \
fe-netjoin.c \
fe-netsplit.c \
fe-common-irc.c \
irc-completion.c \
module-formats.c
libfe_common_irc_a_SOURCES = \

View file

@ -68,6 +68,9 @@ void fe_netsplit_deinit(void);
void fe_netjoin_init(void);
void fe_netjoin_deinit(void);
void irc_completion_init(void);
void irc_completion_deinit(void);
void fe_common_irc_init(void)
{
settings_add_bool("lookandfeel", "show_away_once", TRUE);
@ -86,6 +89,7 @@ void fe_common_irc_init(void)
fe_modes_init();
fe_netsplit_init();
fe_netjoin_init();
irc_completion_init();
settings_check();
module_register("core", "fe-irc");
@ -109,6 +113,7 @@ void fe_common_irc_deinit(void)
fe_modes_deinit();
fe_netsplit_deinit();
fe_netjoin_deinit();
irc_completion_deinit();
theme_unregister();
}

View file

@ -0,0 +1,41 @@
/*
irc-completion.c : irssi
Copyright (C) 1999-2000 Timo Sirainen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "module.h"
#include "signals.h"
#include "chat-completion.h"
static void sig_complete_stats(GList **list, WINDOW_REC *window,
const char *word, const char *line,
int *want_space)
{
*list = completion_get_servers(word);
if (*list != NULL) signal_stop();
}
void irc_completion_init(void)
{
signal_add("complete command stats", (SIGNAL_FUNC) sig_complete_stats);
}
void irc_completion_deinit(void)
{
signal_remove("complete command stats", (SIGNAL_FUNC) sig_complete_stats);
}