— /home/riendf/nerf/src/comm.c 2009-09-09 08:49:45.000000000 -0700
+++ ./comm.c 2009-09-09 11:00:52.000000000 -0700
@@ -30,6 +30,7 @@
#include <stdlib.h>
#include <time.h>
#include <stdarg.h>
+#include <crypt.h>
#include "an.h"
#include "recycle.h"
#include "mob_prog.h"
@@ -1791,7 +1792,7 @@
write_to_buffer(d, "\n\r", 2);
#endif
- if (str_cmp(argument, ch->pcdata->pwd)) {
+ if (str_cmp(crypt(argument,ch->name), ch->pcdata->pwd)) {
sprintf(buf, "Wrong Password: %s@%s\n\r", ch->name, d->host);
info(buf, LEVEL_SENIOR, BUG_INFO);
write_to_buffer(d, "Wrong password.\n\r", 0);
@@ -1930,7 +1931,7 @@
}
free_string(ch->pcdata->pwd);
- ch->pcdata->pwd = str_dup(pwdnew);
+ ch->pcdata->pwd = str_dup(crypt(pwdnew,ch->name));
write_to_buffer(d, "Please retype password: ", 0);
d->connected = CON_CONFIRM_NEW_PASSWORD;
break;
@@ -1939,7 +1940,7 @@
write_to_buffer(d, "\n\r", 2);
#endif
- if (str_cmp(argument, ch->pcdata->pwd)) {
+ if (str_cmp(crypt(argument,ch->name), ch->pcdata->pwd)) {
write_to_buffer(d, "Passwords don't match.\n\rRetype password: ", 0);
d->connected = CON_GET_NEW_PASSWORD;
return;
Mudlet is using QTsockets, and doesn't have a lot of cruft yet. It was quite easy to modify Mudlet to instead call my own network library instead of QT's.
Mudlet is open source, so it's perhaps not the fairest comparison, but it was just an obvious one that sprung to mind. The protocol support issue would be of more concern for closed-source clients - it's just fortunate that the major ones I've encountered do seem to support open protocols.