diff --git a/lua-tg.c b/lua-tg.c index d6f64b1..8349840 100644 --- a/lua-tg.c +++ b/lua-tg.c @@ -712,7 +712,10 @@ enum lua_query_type { lq_extf, lq_import_chat_link, lq_export_chat_link, - lq_channel_invite_user + lq_channel_invite_user, + lq_channel_kick_user, + lq_channel_get_admins, + lq_channel_get_users }; struct lua_query_extra { @@ -1345,6 +1348,18 @@ void lua_do_all (void) { tgl_do_channel_invite_user (TLS, lua_ptr[p + 1].peer_id, lua_ptr[p + 2].peer_id, lua_empty_cb, lua_ptr[p].ptr); p += 3; break; + case lq_channel_kick_user: + tgl_do_channel_kick_user (TLS, lua_ptr[p + 1].peer_id, lua_ptr[p + 2].peer_id, lua_empty_cb, lua_ptr[p].ptr); + p += 3; + break; + case lq_channel_get_admins: + tgl_do_channel_get_members (TLS, lua_ptr[p + 1].peer_id, 100, 0, 1, lua_contact_list_cb, lua_ptr[p].ptr); + p += 2; + break; + case lq_channel_get_users: + tgl_do_channel_get_members (TLS, lua_ptr[p + 1].peer_id, 100, 0, 0, lua_contact_list_cb, lua_ptr[p].ptr); + p += 2; + break; /* lq_delete_msg, lq_restore_msg, @@ -1447,6 +1462,9 @@ struct lua_function functions[] = { {"import_chat_link", lq_import_chat_link, { lfp_string, lfp_none }}, {"export_chat_link", lq_export_chat_link, { lfp_chat, lfp_none }}, {"channel_invite_user", lq_channel_invite_user, { lfp_channel, lfp_user, lfp_none }}, + {"channel_kick_user", lq_channel_kick_user, { lfp_channel, lfp_user, lfp_none }}, + {"channel_get_admins", lq_channel_get_admins, { lfp_channel, lfp_none }}, + {"channel_get_users", lq_channel_get_users, { lfp_channel, lfp_none }}, { 0, 0, { lfp_none}} };