summaryrefslogtreecommitdiff
path: root/src/core/channels.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2001-05-11 16:08:48 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2001-05-11 16:08:48 +0000
commit1f23c05ee799bf028200f618fa74815b95382f5c (patch)
treebfbe9f1c73cd1e979dfb219f64f19efe77dd5b9a /src/core/channels.c
parent7a1e526391d1d2f320325076ec4259a7c2a53e68 (diff)
downloadirssi-1f23c05ee799bf028200f618fa74815b95382f5c.zip
CHANNEL_REC->get_join_data() - Returns the information needed to call
SERVER_REC->channels_join() for this channel. Usually just the channel name, but may contain also the channel key. If we receive PART-message to channel that hasn't received a JOIN yet, don't destroy the channel. It's probably because we did quickly /PART + /JOIN. Moved /CYCLE to fe-common/core, it doesn't close the window for the cycled channel anymore if you had autoclosing on. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1484 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/channels.c')
-rw-r--r--src/core/channels.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/channels.c b/src/core/channels.c
index e3728eb5..f3d3a7a4 100644
--- a/src/core/channels.c
+++ b/src/core/channels.c
@@ -30,6 +30,11 @@
GSList *channels; /* List of all channels */
+static char *get_join_data(CHANNEL_REC *channel)
+{
+ return g_strdup(channel->name);
+}
+
void channel_init(CHANNEL_REC *channel, int automatic)
{
g_return_if_fail(channel != NULL);
@@ -45,6 +50,7 @@ void channel_init(CHANNEL_REC *channel, int automatic)
channel->type = module_get_uniq_id_str("WINDOW ITEM TYPE", "CHANNEL");
channel->mode = g_strdup("");
channel->createtime = time(NULL);
+ channel->get_join_data = get_join_data;
signal_emit("channel created", 2, channel, GINT_TO_POINTER(automatic));
}