Hi,

Thanks for the patch!

Some comments inline.

On Mon, Apr 08, 2019 at 02:21:50PM -0700, João Duarte wrote:
> 
> My very humble rookie attempt at dealing with issue 1315, after struggling 
> with a lot of prosody stuff this last week =D
> 
> I was able to run configure and make normally, as far as it seems to me. I 
> couldn't use "make test" though, I must be some newbie mistake, because i 
> couldn't use the command either when tried to use it on the source files.
> 
> I am not being able to debug it as I wanted to, basically because I still 
> don't know how to connect my users/hosts to a server. Yet! 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "prosody-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/prosody-dev.
> For more options, visit https://groups.google.com/d/optout.

> # HG changeset patch
> # User Joao Duarte <[email protected]>
> # Date 1554757738 25200
> #      Mon Apr 08 14:08:58 2019 -0700
> # Node ID 581188752c01fef3c4b8239e142c5d733557d902
> # Parent  f1594893998f46be2817957c165a64e642831bbb
> Adding c2s:closeall() command to the telnet console (Issue 1315)

Commit messages should generally be of the form

>> mod_something: Fix the thing (fixes #1234)

I like it when the commit message answers "what does this do?", ie "When
applied, this patch will ... fix the thing" is a valid sentence.

See <https://prosody.im/doc/contributing#commit_messages>       

> 
> diff -r f1594893998f -r 581188752c01 configure
> --- a/configure       Fri Apr 05 18:18:23 2019 +0200
> +++ b/configure       Mon Apr 08 14:08:58 2019 -0700

Changes to the 'configure' file are unrelated and should not be
included.

You can commit only select files by including them on the command line
like `hg commit plugins/mod_admin_telnet.lua`. By default it would
commit all files. `hg commit --interactive` is also amazing, it lets you
select files and individual lines to commit.

If you have a recent version of Mercurial then there is an `uncommit`
command provided by a plugin of the same name that can remove
accidentally committed files.

> @@ -22,6 +22,8 @@
>  EXCERTS="yes"
>  PRNG=
>  PRNGLIBS=
> +#LOG ="*console"
> +#prosody_user = "root"
>  
>  CFLAGS="-fPIC -std=c99"
>  CFLAGS="$CFLAGS -Wall -pedantic -Wextra -Wshadow -Wformat=2"
> diff -r f1594893998f -r 581188752c01 plugins/mod_admin_telnet.lua
> --- a/plugins/mod_admin_telnet.lua    Fri Apr 05 18:18:23 2019 +0200
> +++ b/plugins/mod_admin_telnet.lua    Mon Apr 08 14:08:58 2019 -0700
> @@ -250,6 +250,7 @@
>               print [[c2s:show_secure() - Show all encrypted client 
> connections]]
>               print [[c2s:show_tls() - Show TLS cipher info for encrypted 
> sessions]]
>               print [[c2s:close(jid) - Close all sessions for the specified 
> JID]]
> +             print [[c2s:closeall() - CLose all active c2s connections ]]
>       elseif section == "s2s" then
>               print [[s2s:show(domain) - Show all s2s connections for the 
> given domain (or all if no domain given)]]
>               print [[s2s:show_tls(domain) - Show TLS cipher info for 
> encrypted sessions]]
> @@ -661,6 +662,17 @@
>       return true, "Total: "..count.." sessions closed";
>  end
>  
> +function def_env.c2s:closeall()
> +     local count = 0;
> +     --luacheck: ignore 212/jid
> +     show_c2s(function (jid, session)
> +             count = count +1;
> +             session:close();
> +     end);
> +     return true, "Total: "..count.." sessions closed";
> +
> +end
> +
>  
>  def_env.s2s = {};
>  function def_env.s2s:show(match_jid, annotate)


This looks good.


-- 
Regards,
Kim "Zash" Alvefur

-- 
You received this message because you are subscribed to the Google Groups 
"prosody-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/prosody-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to