From 755a8d40eb5f9e0a12b98e4f84332891a3d63b1a Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 2 Sep 2000 18:53:58 +0000 Subject: Updates. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@641 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/queries.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'src/core/queries.c') diff --git a/src/core/queries.c b/src/core/queries.c index f3e59184..c9793f7a 100644 --- a/src/core/queries.c +++ b/src/core/queries.c @@ -28,6 +28,21 @@ GSList *queries; typedef QUERY_REC *(*QUERY_FIND_FUNC)(SERVER_REC *, const char *); +/* Create a new query */ +QUERY_REC *query_create(int chat_type, SERVER_REC *server, + const char *nick, int automatic) +{ + QUERY_REC *query; + + g_return_val_if_fail(server == NULL || IS_SERVER(server), NULL); + g_return_val_if_fail(nick != NULL, NULL); + + query = NULL; + signal_emit("query create", 5, &query, GINT_TO_POINTER(chat_type), + server, nick, GINT_TO_POINTER(automatic)); + return query; +} + void query_init(QUERY_REC *query, int automatic) { g_return_if_fail(query != NULL); @@ -40,7 +55,7 @@ void query_init(QUERY_REC *query, int automatic) } MODULE_DATA_INIT(query); - query->type = module_get_uniq_id("QUERY", 0); + query->type = module_get_uniq_id_str("WINDOW ITEM TYPE", "QUERY"); if (query->server != NULL) query->server_tag = g_strdup(query->server->tag); -- cgit v1.2.3