summaryrefslogtreecommitdiff
path: root/src/fe-common/irc/fe-ircnet.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-28 17:15:37 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-28 17:15:37 +0000
commit7e531cec7a80a3bc6cecb844d66ae5127f7e7a94 (patch)
tree2e2452b4fbec35a8a34e0b7364544c43d71bcd83 /src/fe-common/irc/fe-ircnet.c
parentdd7ce4af23a0bb68a8c735c7e9a4c0d9c50ae08b (diff)
downloadirssi-7e531cec7a80a3bc6cecb844d66ae5127f7e7a94.zip
Automatic command completion and a few other fixes.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@387 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-ircnet.c')
-rw-r--r--src/fe-common/irc/fe-ircnet.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/fe-common/irc/fe-ircnet.c b/src/fe-common/irc/fe-ircnet.c
index adc4f03c..9a361bce 100644
--- a/src/fe-common/irc/fe-ircnet.c
+++ b/src/fe-common/irc/fe-ircnet.c
@@ -28,11 +28,6 @@
#include "irc-server.h"
#include "ircnet-setup.h"
-static void cmd_ircnet(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
-{
- command_runsub("ircnet", data, server, item);
-}
-
static void cmd_ircnet_list(void)
{
GString *str;
@@ -155,10 +150,17 @@ static void cmd_ircnet_remove(const char *data)
}
}
+static void cmd_ircnet(const char *data, IRC_SERVER_REC *server, WI_ITEM_REC *item)
+{
+ if (*data == '\0')
+ cmd_ircnet_list();
+ else
+ command_runsub("ircnet", data, server, item);
+}
+
void fe_ircnet_init(void)
{
command_bind("ircnet", NULL, (SIGNAL_FUNC) cmd_ircnet);
- command_bind("ircnet ", NULL, (SIGNAL_FUNC) cmd_ircnet_list);
command_bind("ircnet add", NULL, (SIGNAL_FUNC) cmd_ircnet_add);
command_bind("ircnet remove", NULL, (SIGNAL_FUNC) cmd_ircnet_remove);
@@ -168,7 +170,6 @@ void fe_ircnet_init(void)
void fe_ircnet_deinit(void)
{
command_unbind("ircnet", (SIGNAL_FUNC) cmd_ircnet);
- command_unbind("ircnet ", (SIGNAL_FUNC) cmd_ircnet_list);
command_unbind("ircnet add", (SIGNAL_FUNC) cmd_ircnet_add);
command_unbind("ircnet remove", (SIGNAL_FUNC) cmd_ircnet_remove);
}