Added password requesting
This commit is contained in:
parent
c082fc4f3c
commit
9cdab465f1
@ -313,6 +313,11 @@ wmud_client_start_login(wmudClient *client)
|
||||
wmud_client_send(client, "Your registration is not finished yet.\r\n");
|
||||
wmud_client_close(client, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
client->state = WMUD_CLIENT_STATE_PASSWAIT;
|
||||
wmud_client_send(client, "Please provide us your password: %c%c%c", TELNET_IAC, TELNET_WONT, TELNET_ECHO);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5,6 +5,11 @@
|
||||
|
||||
#include "wmud_types.h"
|
||||
|
||||
#define TELNET_IAC '\xff'
|
||||
#define TELNET_WONT '\xfc'
|
||||
#define TELNET_WILL '\xfb'
|
||||
#define TELNET_ECHO '\x01'
|
||||
|
||||
extern GSList *clients;
|
||||
|
||||
gboolean wmud_networking_init(guint port_number, GError **err);
|
||||
|
@ -16,7 +16,14 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <glib.h>
|
||||
#ifdef HAVE_CRYPT_H
|
||||
#include <crypt.h>
|
||||
#endif
|
||||
|
||||
#include "networking.h"
|
||||
#include "players.h"
|
||||
@ -26,6 +33,8 @@ GSList *players = NULL;
|
||||
gboolean
|
||||
wmud_player_auth(wmudClient *client)
|
||||
{
|
||||
g_log(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, "Player entered %s as password", client->buffer->str);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user