Fixes for whoson and send online message
This commit is contained in:
parent
b968d11074
commit
af926964ba
@ -87,6 +87,9 @@ v0.37.01 14-Jan-2003.
|
|||||||
New menu 221, display arearules. This function tries to find
|
New menu 221, display arearules. This function tries to find
|
||||||
the arearules in the rules directory and if found displays
|
the arearules in the rules directory and if found displays
|
||||||
this to the user.
|
this to the user.
|
||||||
|
Fixed whoson list to display user real names and handles again.
|
||||||
|
Fixed send online message to send to user real names, handles
|
||||||
|
and unix names again.
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
The English and Dutch templates are updated to show the new
|
The English and Dutch templates are updated to show the new
|
||||||
|
7
TODO
7
TODO
@ -39,6 +39,13 @@ mbsebbs:
|
|||||||
|
|
||||||
N: Only count posted messages in local mail areas.
|
N: Only count posted messages in local mail areas.
|
||||||
|
|
||||||
|
L: ChangeHandle, allow own unix name as handle.
|
||||||
|
|
||||||
|
|
||||||
|
newuser:
|
||||||
|
L: Allow handles to be the same as the unixname.
|
||||||
|
|
||||||
|
|
||||||
mbfido:
|
mbfido:
|
||||||
N: The elist rules files are named (8.3) areaname.rul where areaname
|
N: The elist rules files are named (8.3) areaname.rul where areaname
|
||||||
is the first 8 characters of the area name and we use the full name
|
is the first 8 characters of the area name and we use the full name
|
||||||
|
@ -104,10 +104,10 @@ void WhosOn(char *OpData)
|
|||||||
device = xstrcpy(strtok(NULL, ","));
|
device = xstrcpy(strtok(NULL, ","));
|
||||||
fullname = xstrcpy(strtok(NULL, ","));
|
fullname = xstrcpy(strtok(NULL, ","));
|
||||||
|
|
||||||
if (((strcasecmp(OpData, "/H")) == 0) || (strcasecmp(OpData, "/U") == 0)) {
|
if (((strcasecmp(OpData, "/H")) == 0) || (strlen(OpData) == 0)) {
|
||||||
/*
|
/*
|
||||||
* The mbtask daemon has only the users real names, we
|
* The mbtask daemon has only the users Unix names, we
|
||||||
* want the handle or unix name instead.
|
* want the handle or real name instead.
|
||||||
*/
|
*/
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
||||||
@ -115,13 +115,13 @@ void WhosOn(char *OpData)
|
|||||||
fread(&ushdr, sizeof(ushdr), 1, fp);
|
fread(&ushdr, sizeof(ushdr), 1, fp);
|
||||||
|
|
||||||
while (fread(&us, ushdr.recsize, 1, fp) == 1) {
|
while (fread(&us, ushdr.recsize, 1, fp) == 1) {
|
||||||
if (strcmp(fullname, us.sUserName) == 0) {
|
if (strcmp(fullname, us.Name) == 0) {
|
||||||
if ((strcasecmp(OpData, "/H") == 0) && strlen(us.sHandle)) {
|
if ((strcasecmp(OpData, "/H") == 0) && strlen(us.sHandle)) {
|
||||||
free(fullname);
|
free(fullname);
|
||||||
fullname = xstrcpy(us.sHandle);
|
fullname = xstrcpy(us.sHandle);
|
||||||
} else if (strcasecmp(OpData, "/U") == 0) {
|
} else if (strlen(OpData) == 0) {
|
||||||
free(fullname);
|
free(fullname);
|
||||||
fullname = xstrcpy(us.Name);
|
fullname = xstrcpy(us.sUserName);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -289,10 +289,10 @@ void SendOnlineMsg(char *OpData)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we were displaying handles or unix names, then lookup the
|
* If we were displaying handles or real names, then lookup the
|
||||||
* users fullname to send to mbtask.
|
* users unix name to send to mbtask.
|
||||||
*/
|
*/
|
||||||
if ((strcasecmp(OpData, "/H") == 0) || (strcasecmp(OpData, "/U") == 0)) {
|
if ((strcasecmp(OpData, "/H") == 0) || (strlen(OpData) == 0)) {
|
||||||
temp = calloc(PATH_MAX, sizeof(char));
|
temp = calloc(PATH_MAX, sizeof(char));
|
||||||
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
|
||||||
if ((fp = fopen(temp, "rb")) != NULL) {
|
if ((fp = fopen(temp, "rb")) != NULL) {
|
||||||
@ -301,10 +301,10 @@ void SendOnlineMsg(char *OpData)
|
|||||||
|
|
||||||
while (fread(&us, ushdr.recsize, 1, fp) == 1) {
|
while (fread(&us, ushdr.recsize, 1, fp) == 1) {
|
||||||
if ((strcasecmp(OpData, "/H") == 0) && strlen(us.sHandle) && (strcasecmp(User, us.sHandle) == 0)) {
|
if ((strcasecmp(OpData, "/H") == 0) && strlen(us.sHandle) && (strcasecmp(User, us.sHandle) == 0)) {
|
||||||
sprintf(User, "%s", us.sUserName);
|
sprintf(User, "%s", us.Name);
|
||||||
break;
|
break;
|
||||||
} else if ((strcasecmp(OpData, "/U") == 0) && (strcasecmp(User, us.Name) == 0)) {
|
} else if ((strlen(OpData) == 0) && (strcasecmp(User, us.sUserName) == 0)) {
|
||||||
sprintf(User, "%s", us.sUserName);
|
sprintf(User, "%s", us.Name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user