+ msgfilepath = motdfil;
+ }
+
+ if (msgfilepath == downfil)
+ pr("Enter a message shown to countries trying to log in.\n");
+ else
+ pr("Enter a new message of the day.\n");
+
+ time(&tgm.tel_date);
+ tgm.tel_length = getele("The World", buf);
+
+ if (tgm.tel_length < 0)
+ {
+ pr("Ignored\n");
+ if (msgfilepath == downfil)
+ pr("NOT disabling logins.\n");
+ return RET_SYN;
+ } else if (tgm.tel_length == 0)
+ {
+ if (msgfilepath == motdfil)
+ {
+ pr("Removing exsting motd.\n");
+ if ((unlink(msgfilepath) == -1) && (errno != ENOENT))
+ {
+ pr("Could not remove motd.\n");
+ logerror("Could not remove motd file (%s).\n", msgfilepath);
+ return RET_SYS;
+ }
+ return RET_OK;
+ } else
+ pr("Writing empty no-login message.\n");
+ }
+