summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 1cb7942f..720f876e 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -156,7 +156,7 @@ u_exit(char *mode)
setutmpbid(0);
if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_SYSOPHIDE)) &&
!currutmp->invisible)
- do_aloha(SHM->i18nstr[cuser.language][1319]);
+ do_aloha(I18N[1319]);
purge_utmp(currutmp);
if ((cuser.uflag != enter_uflag) || (currmode & MODE_DIRTY) || diff) {
@@ -215,10 +215,10 @@ talk_request(int sig)
move(0, 0);
clrtoeol();
- prints(SHM->i18nstr[cuser.language][1321],
+ prints(I18N[1321],
SHM->uinfo[currutmp->destuip].userid, my_ctime(&now,timebuf,sizeof(timebuf)),
- (currutmp->sig == 2) ? SHM->i18nstr[cuser.language][1322]
- : SHM->i18nstr[cuser.language][1323]);
+ (currutmp->sig == 2) ? I18N[1322]
+ : I18N[1323]);
refresh();
} else {
unsigned char mode0 = currutmp->mode;
@@ -241,7 +241,7 @@ void
show_call_in(int save, int which)
{
char buf[200];
- snprintf(buf, sizeof(buf), SHM->i18nstr[cuser.language][1324],
+ snprintf(buf, sizeof(buf), I18N[1324],
currutmp->msgs[which].userid, currutmp->msgs[which].last_call_in);
move(b_lines, 0);
clrtoeol();
@@ -438,7 +438,7 @@ multi_user_check()
if (!pid /* || (kill(pid, 0) == -1) */ )
return; /* stale entry in utmp file */
- getdata(b_lines - 1, 0, SHM->i18nstr[cuser.language][1325],
+ getdata(b_lines - 1, 0, I18N[1325],
genbuf, 3, LCECHO);
if (genbuf[0] != 'n') {
@@ -452,7 +452,7 @@ multi_user_check()
} else {
/* allow multiple guest user */
if (search_ulistn(usernum, 100) != NULL) {
- vmsg(SHM->i18nstr[cuser.language][1326]);
+ vmsg(I18N[1326]);
exit(1);
}
}
@@ -530,7 +530,7 @@ login_query()
move(19, 0);
prints("current pid: %d ", getpid());
#endif
- getdata(20, 0, SHM->i18nstr[cuser.language][1327],
+ getdata(20, 0, I18N[1327],
uid, sizeof(uid), DOECHO);
#ifdef CONVERT
/* switch to gb mode if uid end with '.' */
@@ -553,7 +553,7 @@ login_query()
mkuserdir(cuser.userid);
break;
#else
- outs(SHM->i18nstr[cuser.language][1328]);
+ outs(I18N[1328]);
continue;
#endif
} else if (uid[0] == '\0'){
@@ -777,7 +777,7 @@ setup_utmp(int mode)
}
inline static void welcome_msg(void) {
- prints(SHM->i18nstr[cuser.language][1329],
+ prints(I18N[1329],
++cuser.numlogins, cuser.lasthost, Cdate(&(cuser.lastlogin)));
pressanykey();
}
@@ -787,8 +787,8 @@ inline static void check_bad_login(void) {
setuserfile(genbuf, str_badlogin);
if (more(genbuf, NA) != -1) {
move(b_lines - 3, 0);
- prints(SHM->i18nstr[cuser.language][1330]);
- if (getans(SHM->i18nstr[cuser.language][1331]) != 'n')
+ prints(I18N[1330]);
+ if (getans(I18N[1331]) != 'n')
unlink(genbuf);
}
}
@@ -816,23 +816,23 @@ static void init_guest_info(void)
{
int i;
char *nick[13] = {
- SHM->i18nstr[cuser.language][1332], SHM->i18nstr[cuser.language][1333], SHM->i18nstr[cuser.language][1334], SHM->i18nstr[cuser.language][1335], SHM->i18nstr[cuser.language][1336],
- SHM->i18nstr[cuser.language][1337], SHM->i18nstr[cuser.language][1338], SHM->i18nstr[cuser.language][1339], SHM->i18nstr[cuser.language][1340], SHM->i18nstr[cuser.language][1341],
- SHM->i18nstr[cuser.language][1342], SHM->i18nstr[cuser.language][1343], SHM->i18nstr[cuser.language][1344]
+ I18N[1332], I18N[1333], I18N[1334], I18N[1335], I18N[1336],
+ I18N[1337], I18N[1338], I18N[1339], I18N[1340], I18N[1341],
+ I18N[1342], I18N[1343], I18N[1344]
};
char *name[13] = {
- SHM->i18nstr[cuser.language][1345], SHM->i18nstr[cuser.language][1346], SHM->i18nstr[cuser.language][1347], SHM->i18nstr[cuser.language][1348], SHM->i18nstr[cuser.language][1349],
- SHM->i18nstr[cuser.language][1350], SHM->i18nstr[cuser.language][1351], "AIR Jordon", SHM->i18nstr[cuser.language][1352], SHM->i18nstr[cuser.language][1353],
- SHM->i18nstr[cuser.language][1354], SHM->i18nstr[cuser.language][1355], SHM->i18nstr[cuser.language][1356]
+ I18N[1345], I18N[1346], I18N[1347], I18N[1348], I18N[1349],
+ I18N[1350], I18N[1351], "AIR Jordon", I18N[1352], I18N[1353],
+ I18N[1354], I18N[1355], I18N[1356]
};
char *addr[13] = {
- SHM->i18nstr[cuser.language][1357], SHM->i18nstr[cuser.language][1358], SHM->i18nstr[cuser.language][1359], SHM->i18nstr[cuser.language][1360], SHM->i18nstr[cuser.language][1361],
- SHM->i18nstr[cuser.language][1362], SHM->i18nstr[cuser.language][1363], "NIKE", SHM->i18nstr[cuser.language][1364], SHM->i18nstr[cuser.language][1365],
- SHM->i18nstr[cuser.language][1366], SHM->i18nstr[cuser.language][1367], SHM->i18nstr[cuser.language][1368]
+ I18N[1357], I18N[1358], I18N[1359], I18N[1360], I18N[1361],
+ I18N[1362], I18N[1363], "NIKE", I18N[1364], I18N[1365],
+ I18N[1366], I18N[1367], I18N[1368]
};
i = login_start_time % 13;
snprintf(cuser.username, sizeof(cuser.username),
- SHM->i18nstr[cuser.language][1369], nick[(int)i]);
+ I18N[1369], nick[(int)i]);
strlcpy(currutmp->username, cuser.username,
sizeof(currutmp->username));
strlcpy(cuser.realname, name[(int)i], sizeof(cuser.realname));
@@ -845,11 +845,11 @@ static void init_guest_info(void)
inline static void foreign_warning(void){
if ((cuser.uflag2 & FOREIGN) && !(cuser.uflag2 & LIVERIGHT)){
if (login_start_time - cuser.firstlogin > (FOREIGN_REG_DAY - 5) * 24 * 3600){
- mail_muser(cuser, SHM->i18nstr[cuser.language][1370], "etc/foreign_expired_warn");
+ mail_muser(cuser, I18N[1370], "etc/foreign_expired_warn");
}
else if (login_start_time - cuser.firstlogin > FOREIGN_REG_DAY * 24 * 3600){
cuser.userlevel &= ~(PERM_LOGINOK | PERM_POST);
- vmsg(SHM->i18nstr[cuser.language][1371]);
+ vmsg(I18N[1371]);
}
}
}
@@ -894,7 +894,7 @@ user_login()
resolve_fcache();
resolve_boards();
memset(&water[0], 0, sizeof(water_t) * 6);
- strlcpy(water[0].userid, SHM->i18nstr[cuser.language][1372], sizeof(water[0].userid));
+ strlcpy(water[0].userid, I18N[1372], sizeof(water[0].userid));
if(getenv("SSH_CLIENT") != NULL){
char frombuf[50];
@@ -919,7 +919,7 @@ user_login()
if (!(HAS_PERM(PERM_SYSOP) && HAS_PERM(PERM_SYSOPHIDE)) &&
!currutmp->invisible)
- do_aloha(SHM->i18nstr[cuser.language][1373]);
+ do_aloha(I18N[1373]);
if(SHM->loginmsg.pid)
{
@@ -1048,7 +1048,7 @@ start_client()
showansi = 0;
signal(SIGALRM, SIG_IGN);
- domenu(MMENU, SHM->i18nstr[cuser.language][1374], (currutmp->mailalert ? 'M' : 'C'), cmdlist);
+ domenu(MMENU, I18N[1374], (currutmp->mailalert ? 'M' : 'C'), cmdlist);
}
/* FSA (finite state automata) for telnet protocol */
@@ -1438,7 +1438,7 @@ check_ban_and_load(int fd)
write(fd, INSCREEN, sizeof(INSCREEN));
#else
#define BANNER \
-SHM->i18nstr[cuser.language][1375] BBSNAME SHM->i18nstr[cuser.language][1376] MYHOSTNAME SHM->i18nstr[cuser.language][1377] MYIP ") \r\n"
+I18N[1375] BBSNAME I18N[1376] MYHOSTNAME I18N[1377] MYIP ") \r\n"
write(fd, BANNER, sizeof(BANNER));
#endif
@@ -1463,9 +1463,9 @@ SHM->i18nstr[cuser.language][1375] BBSNAME SHM->i18nstr[cuser.language][1376] MY
}
if(overload == 1)
- write(fd, SHM->i18nstr[cuser.language][1378], 22);
+ write(fd, I18N[1378], 22);
else if(overload == 2)
- write(fd, SHM->i18nstr[cuser.language][1379], 28);
+ write(fd, I18N[1379], 28);
else if (banned && (fp = fopen(BBSHOME "/" BAN_FILE, "r"))) {
char buf[256];
while (fgets(buf, sizeof(buf), fp))