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-irc-channels.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-irc-channels.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-channels.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/fe-common/irc/fe-irc-channels.c b/src/fe-common/irc/fe-irc-channels.c index ef9a79b8..853fe587 100644 --- a/src/fe-common/irc/fe-irc-channels.c +++ b/src/fe-common/irc/fe-irc-channels.c @@ -21,16 +21,13 @@ #include "module.h" #include "module-formats.h" #include "signals.h" -#include "commands.h" #include "levels.h" -#include "servers.h" -#include "irc.h" #include "channel-rejoin.h" #include "printtext.h" -static void sig_channel_rejoin(IRC_SERVER_REC *server, REJOIN_REC *rec) +static void sig_channel_rejoin(SERVER_REC *server, REJOIN_REC *rec) { g_return_if_fail(rec != NULL); @@ -38,22 +35,12 @@ static void sig_channel_rejoin(IRC_SERVER_REC *server, REJOIN_REC *rec) IRCTXT_CHANNEL_REJOIN, rec->channel); } -static void cmd_channel(const char *data, SERVER_REC *server) -{ - if (ischannel(*data)) { - signal_emit("command join", 2, data, server); - signal_stop(); - } -} - void fe_irc_channels_init(void) { signal_add("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); - command_bind("channel", NULL, (SIGNAL_FUNC) cmd_channel); } void fe_irc_channels_deinit(void) { signal_remove("channel rejoin new", (SIGNAL_FUNC) sig_channel_rejoin); - command_unbind("channel", (SIGNAL_FUNC) cmd_channel); } |