int __declspec(dllexport) FAR PASCAL ScanConsole(HWND mWnd, HWND aWnd, char *data, char *parms, BOOL show, BOOL nopause){
Console not detected",PROGNAME,MB_OK);
HWND hwnd;
int i;
char newline = '\n';
char *result;
if (game != ALL){
hwnd = gethwnd();
if (hwnd == NULL) return 0;
}
int length = strlen(console);
strcpy(data,"\0");
if (game != ALL){
EnumChildWindows(hwnd,ScanString,NULL);
}else{
for(i=1;i<=(ALL-1);i++){
hwnd = gethwndgame(i);
if (hwnd != NULL) EnumChildWindows(hwnd,ScanString,NULL);
}
}
substr(console,console,0,4096);
MessageBox(NULL,va("Wolf Console contains %s",console),PROGNAME,MB_OK);
data = strstr(console,"]/ingameirc_");
if (data == NULL){
MessageBox(NULL,"message ]/irc NOT found",PROGNAME,MB_OK);
CleanConsole();
return 1;
}else{
MessageBox(NULL,va("message ]/irc found"),PROGNAME,MB_OK);
result = strchr(data,newline);
if (result == NULL){
//strcpy(data,"FALSE");
CleanConsole();
return 1;
}else{
MessageBox(NULL,va("found newline and switched nullpoiter"),PROGNAME,MB_OK);
*result = '\0';
data = strstr(console,"ingameirc_");
MessageBox(NULL,va("newdata %s \nswitching data[10] %c",data,data[10]),PROGNAME,MB_OK);
switch(data[10]){
case 's':
case 'S':
MessageBox(NULL,va("Say data = %s",data),PROGNAME,MB_OK);
//CleanConsole();
return 2;
break;
case 'm':
case 'M':
MessageBox(NULL,va("Msg data = %s",data),PROGNAME,MB_OK);
//CleanConsole();
return 3;
break;
case 'c':
case 'C':
MessageBox(NULL,va("Cmd data = %s",data),PROGNAME,MB_OK);
//CleanConsole();
return 2;
break;
default:
MessageBox(NULL,va("Def data = %s",data),PROGNAME,MB_OK);
return 2;
break;
}
}
}
CleanConsole();
return 1;
}