\r
// Print Mode\r
// - Owner\r
- acl.group = 0; acl.id = info.uid;\r
+ acl.object = info.uid;\r
_SysGetACL(fp, &acl);\r
if(acl.perms & 1) modeStr[0] = 'r'; else modeStr[0] = '-';\r
if(acl.perms & 2) modeStr[1] = 'w'; else modeStr[1] = '-';\r
if(acl.perms & 8) modeStr[2] = 'x'; else modeStr[2] = '-';\r
// - Group\r
- acl.group = 1; acl.id = info.gid;\r
+ acl.object = info.gid | 0x80000000;\r
_SysGetACL(fp, &acl);\r
if(acl.perms & 1) modeStr[3] = 'r'; else modeStr[3] = '-';\r
if(acl.perms & 2) modeStr[4] = 'w'; else modeStr[4] = '-';\r
if(acl.perms & 8) modeStr[5] = 'x'; else modeStr[5] = '-';\r
// - World\r
- acl.group = 1; acl.id = -1;\r
+ acl.object = 0xFFFFFFFF;\r
_SysGetACL(fp, &acl);\r
if(acl.perms & 1) modeStr[6] = 'r'; else modeStr[6] = '-';\r
if(acl.perms & 2) modeStr[7] = 'w'; else modeStr[7] = '-';\r
\r
// HACK: Static server entry\r
// UCC (University [of Western Australia] Computer Club) IRC Server\r
- gWindow_Status.Server = Server_Connect( "UCC", "130.95.13.18", 6667 );\r
-// gWindow_Status.Server = Server_Connect( "Freenode", "89.16.176.16", 6667 );\r
+// gWindow_Status.Server = Server_Connect( "UCC", "130.95.13.18", 6667 );\r
+ gWindow_Status.Server = Server_Connect( "Freenode", "89.16.176.16", 6667 );\r
// gWindow_Status.Server = Server_Connect( "Host", "10.0.2.2", 6667 );\r
// gWindow_Status.Server = Server_Connect( "BitlBee", "192.168.1.34", 6667 );\r
\r
\r
{\r
int pos = SetCursorPos(giTerminal_Height-2, 0);\r
- #if 1\r
if( win == gpCurrentWindow ) {\r
int prefixlen = strlen(Source) + 3;\r
int avail = giTerminal_Width - prefixlen;\r
printf("[%s] %.*s\n", Source, avail, Message);\r
while( msglen > avail ) {\r
msglen -= avail;\r
+ Message += avail;\r
printf("\x1B[T");\r
SetCursorPos(giTerminal_Height-2, prefixlen);\r
printf("%.*s\n", avail, Message);\r
}\r
}\r
- #else\r
- if(win->Name[0])\r
- printf("%s/%s [%s] %s\n", win->Server->Name, win->Name, Source, Message);\r
- else\r
- printf("(status) [%s] %s\n", Source, Message);\r
- #endif\r
SetCursorPos(-1, pos);\r
}\r
\r
break;\r
}\r
}\r
- else if( strcmp(cmd, "PING") == 0 )\r
- {\r
- writef(Server->FD, "PONG %s\n", gsHostname);\r
- }\r
else if( strcmp(cmd, "NOTICE") == 0 )\r
{\r
char *class, *message;\r
Message_AppendF(Server, MSG_TYPE_SERVER, "", "", "Unknown message %s (%s)\n", cmd, Line+pos);\r
}\r
}\r
- else {\r
+ else { \r
+ cmd = GetValue(Line, &pos);\r
\r
- // Command to client\r
- Message_AppendF(NULL, MSG_TYPE_UNK, "", "", "Client Command: %s", Line);\r
+ if( strcmp(cmd, "PING") == 0 ) {\r
+ writef(Server->FD, "PONG %s\n", gsHostname);\r
+ \r
+ }\r
+ else {\r
+ // Command to client\r
+ Message_AppendF(NULL, MSG_TYPE_UNK, "", "", "Client Command: %s", Line);\r
+ }\r
}\r
}\r
\r
// Get Permissions
// - Owner
- acl.group = 0; acl.id = info.uid;
+ acl.object = info.uid;
_SysGetACL(fd, &acl);
if(acl.perms & 1) perms |= 0400; // R
if(acl.perms & 2) perms |= 0200; // W
if(acl.perms & 8) perms |= 0100; // X
// - Group
- acl.group = 1; acl.id = info.gid;
+ acl.object = info.gid | 0x80000000;
_SysGetACL(fd, &acl);
if(acl.perms & 1) perms |= 0040; // R
if(acl.perms & 2) perms |= 0020; // W
if(acl.perms & 8) perms |= 0010; // X
// - World
- acl.group = 1; acl.id = -1;
+ acl.object = 0xFFFFFFFF;
_SysGetACL(fd, &acl);
if(acl.perms & 1) perms |= 0004; // R
if(acl.perms & 2) perms |= 0002; // W
}
size_t URI_file_Read(int Handle, size_t Bytes, void *Buffer)
{
- printf("URI_file_Read: (Handle=%i, Bytes=%i, Buffer=%p)\n",
- Handle, Bytes, Buffer);
- return read(Handle, Bytes, Buffer);
+ printf("URI_file_Read: (Handle=%i, Buffer=%p, Bytes=%i)\n",
+ Handle, Buffer, Bytes);
+ return read(Handle, Buffer, Bytes);
}
size_t URI_file_Write(int Handle, size_t Bytes, void *Buffer)
{
- return write(Handle, Bytes, Buffer);
+ return write(Handle, Buffer, Bytes);
}
void URI_file_Close(int Handle)
{