mirror of
https://github.com/irssi/irssi.git
synced 2026-08-17 15:42:26 +02:00
Updates.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@641 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
28a7908e73
commit
755a8d40eb
31 changed files with 386 additions and 217 deletions
|
|
@ -28,6 +28,21 @@ typedef CHANNEL_REC *(*CHANNEL_FIND_FUNC)(SERVER_REC *, const char *);
|
|||
|
||||
GSList *channels; /* List of all channels */
|
||||
|
||||
/* Create a new channel */
|
||||
CHANNEL_REC *channel_create(int chat_type, SERVER_REC *server,
|
||||
const char *name, int automatic)
|
||||
{
|
||||
CHANNEL_REC *channel;
|
||||
|
||||
g_return_val_if_fail(server == NULL || IS_SERVER(server), NULL);
|
||||
g_return_val_if_fail(name != NULL, NULL);
|
||||
|
||||
channel = NULL;
|
||||
signal_emit("channel create", 5, &channel, GINT_TO_POINTER(chat_type),
|
||||
server, name, GINT_TO_POINTER(automatic));
|
||||
return channel;
|
||||
}
|
||||
|
||||
void channel_init(CHANNEL_REC *channel, int automatic)
|
||||
{
|
||||
g_return_if_fail(channel != NULL);
|
||||
|
|
@ -40,7 +55,7 @@ void channel_init(CHANNEL_REC *channel, int automatic)
|
|||
}
|
||||
|
||||
MODULE_DATA_INIT(channel);
|
||||
channel->type = module_get_uniq_id("CHANNEL", 0);
|
||||
channel->type = module_get_uniq_id_str("WINDOW ITEM TYPE", "CHANNEL");
|
||||
channel->mode = g_strdup("");
|
||||
channel->createtime = time(NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue