added get message query
This commit is contained in:
parent
6e86f81e27
commit
f144d3ff30
@ -158,6 +158,9 @@
|
|||||||
/* use lua */
|
/* use lua */
|
||||||
#undef USE_LUA
|
#undef USE_LUA
|
||||||
|
|
||||||
|
/* fixed for correct valgrind work */
|
||||||
|
#undef VALGRIND_FIXES
|
||||||
|
|
||||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||||
#undef gid_t
|
#undef gid_t
|
||||||
|
|
||||||
|
20
configure
vendored
20
configure
vendored
@ -695,6 +695,7 @@ enable_libconfig
|
|||||||
enable_extf
|
enable_extf
|
||||||
enable_liblua
|
enable_liblua
|
||||||
with_progname
|
with_progname
|
||||||
|
enable_valgrind
|
||||||
'
|
'
|
||||||
ac_precious_vars='build_alias
|
ac_precious_vars='build_alias
|
||||||
host_alias
|
host_alias
|
||||||
@ -1320,6 +1321,7 @@ Optional Features:
|
|||||||
--enable-libconfig/--disable-libconfig
|
--enable-libconfig/--disable-libconfig
|
||||||
--enable-extf/--disable-extf
|
--enable-extf/--disable-extf
|
||||||
--enable-liblua/--disable-liblua
|
--enable-liblua/--disable-liblua
|
||||||
|
--enable-valgrind/--disable-valgrind
|
||||||
|
|
||||||
Optional Packages:
|
Optional Packages:
|
||||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||||
@ -5892,6 +5894,24 @@ $as_echo "default" >&6; }
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Check whether --enable-valgrind was given.
|
||||||
|
if test "${enable_valgrind+set}" = set; then :
|
||||||
|
enableval=$enable_valgrind;
|
||||||
|
if test "x$enableval" = "xyes" ; then
|
||||||
|
ac_fn_c_check_header_mongrel "$LINENO" "valgrind/memcheck.h" "ac_cv_header_valgrind_memcheck_h" "$ac_includes_default"
|
||||||
|
if test "x$ac_cv_header_valgrind_memcheck_h" = xyes; then :
|
||||||
|
|
||||||
|
$as_echo "#define VALGRIND_FIXES 1" >>confdefs.h
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
for ac_header in execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h
|
for ac_header in execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h
|
||||||
do :
|
do :
|
||||||
|
10
configure.ac
10
configure.ac
@ -108,6 +108,16 @@ AC_ARG_WITH(progname,[--with-progname=<name>],
|
|||||||
],[
|
],[
|
||||||
AC_MSG_RESULT([default])
|
AC_MSG_RESULT([default])
|
||||||
])
|
])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(valgrind,[--enable-valgrind/--disable-valgrind],
|
||||||
|
[
|
||||||
|
if test "x$enableval" = "xyes" ; then
|
||||||
|
AC_CHECK_HEADER(valgrind/memcheck.h, [AC_DEFINE([VALGRIND_FIXES], [1], [fixed for correct valgrind work])], [
|
||||||
|
])
|
||||||
|
fi
|
||||||
|
],[
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
# Checks for header files.
|
# Checks for header files.
|
||||||
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
|
AC_CHECK_HEADERS([execinfo.h fcntl.h malloc.h netdb.h stdlib.h string.h unistd.h arpa/inet.h mach/mach.h netinet/in.h sys/file.h sys/socket.h termios.h])
|
||||||
|
@ -715,6 +715,12 @@ void do_fwd_media (int arg_num, struct arg args[], struct in_ev *ev) {
|
|||||||
tgl_do_forward_message (TLS, args[0].P->id, args[1].num, print_msg_success_gw, ev);
|
tgl_do_forward_message (TLS, args[0].P->id, args[1].num, print_msg_success_gw, ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void do_get_message (int arg_num, struct arg args[], struct in_ev *ev) {
|
||||||
|
assert (arg_num == 1);
|
||||||
|
if (ev) { ev->refcnt ++; }
|
||||||
|
tgl_do_get_message (TLS, args[0].num, print_msg_gw, ev);
|
||||||
|
}
|
||||||
|
|
||||||
void do_msg (int arg_num, struct arg args[], struct in_ev *ev) {
|
void do_msg (int arg_num, struct arg args[], struct in_ev *ev) {
|
||||||
assert (arg_num == 2);
|
assert (arg_num == 2);
|
||||||
if (ev) { ev->refcnt ++; }
|
if (ev) { ev->refcnt ++; }
|
||||||
@ -1189,6 +1195,7 @@ struct command commands[] = {
|
|||||||
{"export_card", {ca_none}, do_export_card, "export_card\tPrints card that can be imported by another user with import_card method"},
|
{"export_card", {ca_none}, do_export_card, "export_card\tPrints card that can be imported by another user with import_card method"},
|
||||||
{"fwd", {ca_peer, ca_number, ca_period, ca_none}, do_fwd, "fwd <peer> <msg-id>+\tForwards message to peer. Forward to secret chats is forbidden"},
|
{"fwd", {ca_peer, ca_number, ca_period, ca_none}, do_fwd, "fwd <peer> <msg-id>+\tForwards message to peer. Forward to secret chats is forbidden"},
|
||||||
{"fwd_media", {ca_peer, ca_number, ca_none}, do_fwd_media, "fwd <peer> <msg-id>\tForwards message media to peer. Forward to secret chats is forbidden. Result slightly differs from fwd"},
|
{"fwd_media", {ca_peer, ca_number, ca_none}, do_fwd_media, "fwd <peer> <msg-id>\tForwards message media to peer. Forward to secret chats is forbidden. Result slightly differs from fwd"},
|
||||||
|
{"get_message", {ca_number, ca_none}, do_get_message, "get_message <msg-id>\tGet message by id"},
|
||||||
{"help", {ca_none}, do_help, "help\tPrints this help"},
|
{"help", {ca_none}, do_help, "help\tPrints this help"},
|
||||||
{"history", {ca_peer, ca_number | ca_optional, ca_number | ca_optional, ca_none}, do_history, "history <peer> [limit] [offset]\tPrints messages with this peer (most recent message lower). Also marks messages as read"},
|
{"history", {ca_peer, ca_number | ca_optional, ca_number | ca_optional, ca_none}, do_history, "history <peer> [limit] [offset]\tPrints messages with this peer (most recent message lower). Also marks messages as read"},
|
||||||
{"import_card", {ca_string, ca_none}, do_import_card, "import_card <card>\tGets user by card and prints it name. You can then send messages to him as usual"},
|
{"import_card", {ca_string, ca_none}, do_import_card, "import_card <card>\tGets user by card and prints it name. You can then send messages to him as usual"},
|
||||||
|
2
tgl
2
tgl
@ -1 +1 @@
|
|||||||
Subproject commit 409a2ba561dfcf8c81e62fa44babce6a805bd811
|
Subproject commit 39c853c03f740b7be3a2883145f80346cef2d0ff
|
Loading…
x
Reference in New Issue
Block a user