$NetBSD: patch-bj,v 1.1.1.1 2001/11/15 23:21:31 taca Exp $ --- yatd/user.c.orig Mon Jul 2 14:12:43 2001 +++ yatd/user.c @@ -86,8 +86,6 @@ return ENOMEM; } -static CONST char *pszFmt; - static int _FuncUser() { if (CheckArgc(2, 2)) @@ -105,8 +103,6 @@ ErrSetData(ENOMEM, ERRFLG_FATAL | ERRFLG_SYSERR, NULL); return FAILURE; } - - Msg2Cli(SUCCESS, pszFmt, SysData.szUser); return SUCCESS; } @@ -115,23 +111,35 @@ */ int FuncUser() { - pszFmt = "'%.256s' is welcome here."; - return _FuncUser(); + int status; + + status = _FuncUser(); + if (status == SUCCESS) + Msg2Cli(status, "'%.256s' is welcome here.", SysData.szUser); + return status; } /* * 'kill' command */ int FuncUserKill() { - pszFmt = "Kill you, '%.256s'."; - return _FuncUser(); + int status; + + status = _FuncUser(); + if (status == SUCCESS) + Msg2Cli(status, "Kill you, '%.256s'.", SysData.szUser); + return status; } /* * 'kill9' command */ int FuncUserKill9() { - pszFmt = "Go to hell!, '%.256s'."; + int status; + SysData.Flags.kill9 = 1; - return _FuncUser(); + status = _FuncUser(); + if (status == SUCCESS) + Msg2Cli(status, "Go to hell!, '%.256s'.", SysData.szUser); + return status; }