diff options
author | Timo Sirainen <cras@irssi.org> | 2001-03-08 00:45:56 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2001-03-08 00:45:56 +0000 |
commit | f5d67dcb5c719af909ae498c7665e2b9eecee7bf (patch) | |
tree | 828c788ac5cc4b24f9999c3829ed2e7affeb1c98 /src/fe-common/core/fe-queries.c | |
parent | 2968d45f82bfba65efffb5dab4e659f13172653a (diff) | |
download | irssi-f5d67dcb5c719af909ae498c7665e2b9eecee7bf.zip |
Command history: allow "next history" to jump back to last msg in
history if we already went over it with "prev history" once.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1365 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/core/fe-queries.c')
-rw-r--r-- | src/fe-common/core/fe-queries.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index c1ffdc9b..1924464a 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -190,12 +190,12 @@ static void cmd_unquery(const char *data, SERVER_REC *server, WI_ITEM_REC *item) query_destroy(query); } -/* SYNTAX: QUERY [-window] <nick> */ +/* SYNTAX: QUERY [-window] [-<server tag>] <nick> [<message>] */ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) { GHashTable *optlist; QUERY_REC *query; - char *nick; + char *nick, *msg; void *free_arg; g_return_if_fail(data != NULL); @@ -206,9 +206,9 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) return; } - if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS | - PARAM_FLAG_UNKNOWN_OPTIONS, - "query", &optlist, &nick)) + if (!cmd_get_params(data, &free_arg, 2 | PARAM_FLAG_GETREST | + PARAM_FLAG_OPTIONS | PARAM_FLAG_UNKNOWN_OPTIONS, + "query", &optlist, &nick, &msg)) return; if (*nick == '\0') cmd_param_error(CMDERR_NOT_ENOUGH_PARAMS); @@ -253,6 +253,16 @@ static void cmd_query(const char *data, SERVER_REC *server, WI_ITEM_REC *item) (SIGNAL_FUNC) signal_query_created_curwin); } + if (*msg != '\0') { + /* FIXME: we'll need some function that does both + of these. and separate the , and . target handling + from own_private messagge.. */ + server->send_message(server, nick, msg); + + signal_emit("message own_private", 4, + server, msg, nick, nick); + } + cmd_params_free(free_arg); } |