summaryrefslogtreecommitdiff
path: root/src/core/queries.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-09-02 18:53:58 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-09-02 18:53:58 +0000
commit755a8d40eb5f9e0a12b98e4f84332891a3d63b1a (patch)
treeb96a317a11affdb428a121176836cf48e707c286 /src/core/queries.c
parent28a7908e7372fe0e81dd439b6559bc2abe3ea6e8 (diff)
downloadirssi-755a8d40eb5f9e0a12b98e4f84332891a3d63b1a.zip
Updates.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@641 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core/queries.c')
-rw-r--r--src/core/queries.c17
1 files changed, 16 insertions, 1 deletions
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);