equal
deleted
inserted
replaced
2 -- |
2 -- |
3 -- This module depends on Prosody's admin_telnet module |
3 -- This module depends on Prosody's admin_telnet module |
4 -- |
4 -- |
5 -- Copyright (C) 2008-2010 Matthew Wild |
5 -- Copyright (C) 2008-2010 Matthew Wild |
6 -- Copyright (C) 2008-2010 Waqas Hussain |
6 -- Copyright (C) 2008-2010 Waqas Hussain |
7 -- Copyright (C) 2012 Mikael Berthe |
7 -- Copyright (C) 2012-2013 Mikael Berthe |
8 -- |
8 -- |
9 -- This project is MIT/X11 licensed. Please see the |
9 -- This project is MIT/X11 licensed. Please see the |
10 -- COPYING file in the source package for more information. |
10 -- COPYING file in the source package for more information. |
11 -- |
11 -- |
12 |
12 |
78 |
78 |
79 -- Create a session in order to use an admin_telnet-like environment |
79 -- Create a session in order to use an admin_telnet-like environment |
80 local session = new_session(); |
80 local session = new_session(); |
81 |
81 |
82 -- Process the message using admin_telnet's onincoming function |
82 -- Process the message using admin_telnet's onincoming function |
83 admin_telnet.console_incoming_message(session, body.."\n"); |
83 admin_telnet.console:process_line(session, body.."\n"); |
84 |
84 |
85 -- Strip trailing blank line |
85 -- Strip trailing blank line |
86 session.fulltext = tostring(session.fulltext):gsub("\n\|%s*$", "") |
86 session.fulltext = tostring(session.fulltext):gsub("\n\|%s*$", "") |
87 |
87 |
88 -- Send the reply stanza |
88 -- Send the reply stanza |