{\r
char *sCommandStr;\r
char *saArgs[32] = {0};\r
- int length = 0;\r
int i;\r
int iArgCount = 0;\r
tReadline *readline_state = Readline_Init(1);\r
// Read Command line\r
sCommandStr = Readline( readline_state );\r
printf("\n");\r
- length = strlen(sCommandStr);\r
\r
// Parse Command Line into arguments\r
iArgCount = Parse_Args(sCommandStr, saArgs);\r
{
int maxfd;
fd_set fds;
+ tInterface *p;
maxfd = 0;
FD_ZERO(&fds);
return -1;
}
- _SysDebug("select returned");
- tInterface *p;
+ // Check for changes (with magic to allow inline deletion)
for( p = (void*)&ifaces, i = ifaces; i; p=i,i = i->Next )
{
if( FD_ISSET(i->SocketFD, &fds) )
sprintf(path, "%s/%s", Directory, filename);
fd = open(path, 0);
+ // Check if the device type is 9 (Network)
if( ioctl(fd, 0, NULL) != 9 )
continue ;
+ // Check if it's a directory
finfo(fd, &info, 0);
-
if( info.flags & FILEFLAG_DIRECTORY )
{
+ // If so, recurse
Scan_Dir(IfaceList, path);
}
else
{
+ // Otherwise, add it to the list
tInterface *new = malloc(sizeof(tInterface) + pathlen);
new->Adapter = (void*)(new + 1);
strcpy(new->Adapter, path);
// Determine if it's a channel or PM message\r
else if( Dest[0] == '#' || Dest[0] == '&' ) // TODO: Better determining here\r
{\r
- tWindow *prev = NULL;\r
- for(win = gpWindows; win; prev = win, win = win->Next)\r
+ for(win = gpWindows; win; win = win->Next)\r
{\r
if( win->Server == Server && strcmp(win->Name, Dest) == 0 )\r
{\r
char *class, *message;\r
\r
class = GetValue(Line, &pos);\r
+ _SysDebug("NOTICE class='%s'", class);\r
\r
if( Line[pos] == ':' ) {\r
message = Line + pos + 1;\r