summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-01 00:39:53 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-01 00:39:53 +0000
commit869279f285e7d516b9e37baaccbc7464852df58d (patch)
tree1c423e0714657267395f4e6dd2aeb5d36c50953d /src/fe-common
parent674d240718b9b70604f571fb992f0439d4d62adf (diff)
downloadirssi-869279f285e7d516b9e37baaccbc7464852df58d.zip
/wjoin and /wquery commands stopped the "channel created" and
"query created" signals - not good. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@571 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/irc/fe-channels.c6
-rw-r--r--src/fe-common/irc/fe-query.c7
-rw-r--r--src/fe-common/irc/irc-completion.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/src/fe-common/irc/fe-channels.c b/src/fe-common/irc/fe-channels.c
index 42cd9a1d..9a87bd79 100644
--- a/src/fe-common/irc/fe-channels.c
+++ b/src/fe-common/irc/fe-channels.c
@@ -37,7 +37,10 @@
static void signal_channel_created(CHANNEL_REC *channel, gpointer automatic)
{
- window_item_create((WI_ITEM_REC *) channel, GPOINTER_TO_INT(automatic));
+ if (window_item_find(channel->server, channel->name) == NULL) {
+ window_item_create((WI_ITEM_REC *) channel,
+ GPOINTER_TO_INT(automatic));
+ }
}
static void signal_channel_created_curwin(CHANNEL_REC *channel)
@@ -45,7 +48,6 @@ static void signal_channel_created_curwin(CHANNEL_REC *channel)
g_return_if_fail(channel != NULL);
window_add_item(active_win, (WI_ITEM_REC *) channel, FALSE);
- signal_stop();
}
static void signal_channel_destroyed(CHANNEL_REC *channel)
diff --git a/src/fe-common/irc/fe-query.c b/src/fe-common/irc/fe-query.c
index f2206726..a7643d55 100644
--- a/src/fe-common/irc/fe-query.c
+++ b/src/fe-common/irc/fe-query.c
@@ -49,8 +49,12 @@ QUERY_REC *privmsg_get_query(IRC_SERVER_REC *server, const char *nick, int own)
static void signal_query_created(QUERY_REC *query, gpointer automatic)
{
+ if (window_item_find(query->server, query->nick) != NULL)
+ return;
+
window_item_create((WI_ITEM_REC *) query, GPOINTER_TO_INT(automatic));
- printformat(query->server, query->nick, MSGLEVEL_CLIENTNOTICE, IRCTXT_QUERY_STARTED, query->nick);
+ printformat(query->server, query->nick, MSGLEVEL_CLIENTNOTICE,
+ IRCTXT_QUERY_STARTED, query->nick);
}
static void signal_query_created_curwin(QUERY_REC *query)
@@ -58,7 +62,6 @@ static void signal_query_created_curwin(QUERY_REC *query)
g_return_if_fail(query != NULL);
window_add_item(active_win, (WI_ITEM_REC *) query, FALSE);
- signal_stop();
}
static void signal_query_destroyed(QUERY_REC *query)
diff --git a/src/fe-common/irc/irc-completion.c b/src/fe-common/irc/irc-completion.c
index cad593d1..5de5294d 100644
--- a/src/fe-common/irc/irc-completion.c
+++ b/src/fe-common/irc/irc-completion.c
@@ -722,7 +722,7 @@ void irc_completion_init(void)
signal_add("send text", (SIGNAL_FUNC) event_text);
signal_add("server connected", (SIGNAL_FUNC) completion_init_server);
signal_add("server disconnected", (SIGNAL_FUNC) completion_deinit_server);
- signal_add("channel created", (SIGNAL_FUNC) completion_init_channel);
+ signal_add_first("channel created", (SIGNAL_FUNC) completion_init_channel);
signal_add_last("channel destroyed", (SIGNAL_FUNC) completion_deinit_channel);
}