[mw-devel] MW3 r1045 - trunk/src
arthur at sucs.org
arthur at sucs.org
Tue Jul 15 15:47:49 BST 2008
Author: arthur
Date: 2008-07-15 15:47:49 +0100 (Tue, 15 Jul 2008)
New Revision: 1045
Modified:
trunk/src/edit.c
trunk/src/init.c
Log:
restore perms if you dont find a mwrc file
Modified: trunk/src/edit.c
===================================================================
--- trunk/src/edit.c 2008-07-15 14:16:02 UTC (rev 1044)
+++ trunk/src/edit.c 2008-07-15 14:47:49 UTC (rev 1045)
@@ -343,6 +343,7 @@
if (*doing)
{
strcpy(usr.doing,doing);
+ usr.dowhen = time(0);
ipc_send_to_username(usr.name, IPC_DOING, usr.doing);
printf(_("New status set.\n"));
broadcast(3, "%s has just changed %s's status to %s.", user->name, usr.name, doing);
@@ -453,6 +454,7 @@
timeon=usr.lastlogout;
printf(_("Last Login: %s"),ctime(&timeon));
time_on(usr.timeused);
+ printf(_("Status: %s (%s ago)\n"), usr.doing, itime(time(0)-usr.dowhen));
} else
if (stringcmp(args,"clearignore",2))
{
Modified: trunk/src/init.c
===================================================================
--- trunk/src/init.c 2008-07-15 14:16:02 UTC (rev 1044)
+++ trunk/src/init.c 2008-07-15 14:47:49 UTC (rev 1045)
@@ -100,17 +100,20 @@
if (stat(path, &stats))
{
/* be quiet about its not there, handle higher up */
+ perms_restore();
return 1;
}
if (!S_ISREG(stats.st_mode))
{
printf(_("Error reading %s: Not a regular file\n"), path);
+ perms_restore();
return 1;
}
if ((file=fopen(path,"r"))==NULL)
{
if (strcmp(".mwrc", filename)) printf(_("Error reading %s: %s\n"), path, strerror(errno));
+ perms_restore();
return 1;
}
perms_restore();
More information about the mw-devel
mailing list