Some query changes. They should now work properly with /SAVEWINDOWS

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1043 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2001-01-01 17:13:55 +00:00 committed by cras
commit c2ea82642d
7 changed files with 40 additions and 31 deletions

View file

@ -25,34 +25,33 @@
#include "irc.h"
#include "irc-queries.h"
QUERY_REC *irc_query_create(IRC_SERVER_REC *server,
QUERY_REC *irc_query_create(const char *server_tag,
const char *nick, int automatic)
{
QUERY_REC *rec;
g_return_val_if_fail(server == NULL || IS_IRC_SERVER(server), NULL);
g_return_val_if_fail(nick != NULL, NULL);
rec = g_new0(QUERY_REC, 1);
rec->chat_type = IRC_PROTOCOL;
rec->name = g_strdup(nick);
rec->server = (SERVER_REC *) server;
rec->server_tag = g_strdup(server_tag);
query_init(rec, automatic);
return rec;
}
static void sig_query_create(QUERY_REC **query,
void *chat_type, IRC_SERVER_REC *server,
void *chat_type, const char *server_tag,
const char *nick, void *automatic)
{
if (chat_protocol_lookup("IRC") != GPOINTER_TO_INT(chat_type))
return;
g_return_if_fail(server == NULL || IS_IRC_SERVER(server));
g_return_if_fail(query != NULL);
g_return_if_fail(nick != NULL);
*query = irc_query_create(server, nick, GPOINTER_TO_INT(automatic));
*query = irc_query_create(server_tag, nick,
GPOINTER_TO_INT(automatic));
signal_stop();
}

View file

@ -18,7 +18,7 @@ void irc_queries_deinit(void);
#define irc_query_find(server, name) \
query_find(SERVER(server), name)
QUERY_REC *irc_query_create(IRC_SERVER_REC *server,
QUERY_REC *irc_query_create(const char *server_tag,
const char *nick, int automatic);
#endif