diff --git a/src/networking.c b/src/networking.c
index c8700f2..5f5c7b1 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -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
{
diff --git a/src/networking.h b/src/networking.h
index a5e9db3..f7d6d2b 100644
--- a/src/networking.h
+++ b/src/networking.h
@@ -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);
diff --git a/src/players.c b/src/players.c
index b585c43..67f6d0b 100644
--- a/src/players.c
+++ b/src/players.c
@@ -16,7 +16,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
#include
+#ifdef HAVE_CRYPT_H
+#include
+#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;
}