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
This commit is contained in:
Timo Sirainen 2001-05-11 16:08:48 +00:00 committed by cras
commit 1f23c05ee7
7 changed files with 74 additions and 43 deletions

View file

@ -23,3 +23,8 @@ unsigned int joined:1; /* Have we even received JOIN event for this channel? */
unsigned int left:1; /* You just left the channel */
unsigned int kicked:1; /* You just got kicked */
unsigned int destroying:1;
/* Return the information needed to call SERVER_REC->channels_join() for
this channel. Usually just the channel name, but may contain also the
channel key. */
char *(*get_join_data)(CHANNEL_REC *channel);

View file

@ -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));
}