mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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:
parent
7a1e526391
commit
1f23c05ee7
7 changed files with 74 additions and 43 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue