Fail announce, pray, telegram and turn on aborted telegrams
Change tele() and turn() to return RET_FAIL when getele() fails. Before, tele() returned RET_OK then, and turn() returned RET_SYN.
This commit is contained in:
parent
a532c76428
commit
358de131f7
2 changed files with 5 additions and 6 deletions
|
@ -50,7 +50,7 @@ tele(void)
|
|||
if (*player->argp[0] == 'a') {
|
||||
if (getele("everybody", buf) <= 0) {
|
||||
pr("Announcement aborted\n");
|
||||
return RET_OK;
|
||||
return RET_FAIL;
|
||||
}
|
||||
pr("\n");
|
||||
to = 0;
|
||||
|
@ -59,7 +59,7 @@ tele(void)
|
|||
} else if (*player->argp[0] == 'p') {
|
||||
if (getele("your Gracious Deity", buf) <= 0) {
|
||||
pr("Prayer aborted\n");
|
||||
return RET_OK;
|
||||
return RET_FAIL;
|
||||
}
|
||||
pr("\n");
|
||||
if (typed_wu(player->cnum, 0, buf, TEL_NORM) < 0)
|
||||
|
@ -77,12 +77,12 @@ tele(void)
|
|||
if (player->argp[2]) {
|
||||
if (getele("multiple recipients", buf) < 0) {
|
||||
pr("Telegram aborted\n");
|
||||
return RET_OK;
|
||||
return RET_FAIL;
|
||||
}
|
||||
} else {
|
||||
if (getele(cname(to), buf) < 0) {
|
||||
pr("Telegram aborted\n");
|
||||
return RET_OK;
|
||||
return RET_FAIL;
|
||||
}
|
||||
}
|
||||
pr("\n");
|
||||
|
|
|
@ -76,12 +76,11 @@ turn(void)
|
|||
|
||||
time(&tgm.tel_date);
|
||||
tgm.tel_length = getele("The World", msgbuf);
|
||||
|
||||
if (tgm.tel_length < 0) {
|
||||
pr("Ignored\n");
|
||||
if (msgfilepath == downfil)
|
||||
pr("NOT disabling logins.\n");
|
||||
return RET_SYN;
|
||||
return RET_FAIL;
|
||||
} else if (tgm.tel_length == 0) {
|
||||
if (msgfilepath == motdfil) {
|
||||
pr("Removing exsting motd.\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue