diff options
author | Timo Sirainen <cras@irssi.org> | 2001-11-02 01:05:14 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-11-02 01:05:14 +0000 |
commit | f354fe54c71485516b76fdd149891191993f60b5 (patch) | |
tree | 1231e8f5e1126c4fa9544a9ce40ce54ace6e05d1 /src/fe-common/irc/fe-netsplit.c | |
parent | 95b94ed83c1372fae4eb14bf8109847bdc65a8d2 (diff) | |
download | irssi-f354fe54c71485516b76fdd149891191993f60b5.zip |
Moved some stuff from irc to core. Added command_bind_proto() function to
bind protocol-specific commands. Added #define command_bind_irc() for easier
access. CMD_IRC_SERVER(server) check should be done at the beginning of each
command requiring IRC server as active server, it handles it correctly the
cases when it is not. Did some other cleanups as well.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1955 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-netsplit.c')
-rw-r--r-- | src/fe-common/irc/fe-netsplit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/fe-common/irc/fe-netsplit.c b/src/fe-common/irc/fe-netsplit.c index 11c586ee..300d3e43 100644 --- a/src/fe-common/irc/fe-netsplit.c +++ b/src/fe-common/irc/fe-netsplit.c @@ -21,12 +21,11 @@ #include "module.h" #include "module-formats.h" #include "signals.h" -#include "commands.h" #include "levels.h" #include "settings.h" -#include "irc.h" #include "irc-servers.h" +#include "irc-commands.h" #include "ignore.h" #include "netsplit.h" @@ -322,8 +321,7 @@ static void cmd_netsplit(const char *data, IRC_SERVER_REC *server) { GSList *list; - if (!IS_IRC_SERVER(server) || !server->connected) - cmd_return_error(CMDERR_NOT_CONNECTED); + CMD_IRC_SERVER(server); if (server->split_servers == NULL) { printformat(NULL, NULL, MSGLEVEL_CLIENTNOTICE, @@ -360,7 +358,7 @@ void fe_netsplit_init(void) read_settings(); signal_add("netsplit new", (SIGNAL_FUNC) sig_netsplit_servers); signal_add("setup changed", (SIGNAL_FUNC) read_settings); - command_bind("netsplit", NULL, (SIGNAL_FUNC) cmd_netsplit); + command_bind_irc("netsplit", NULL, (SIGNAL_FUNC) cmd_netsplit); } void fe_netsplit_deinit(void) |