Moderator: MacroQuest Developers
Code: Select all
VOID GetLoginName(PSPAWNINFO pChar, PCHAR szLine)
{
CHAR equname[MAX_STRING] = {0};
CHAR szTemp[MAX_STRING] = {0};
CHAR szOut[MAX_STRING] = {0};
PCHAR pSearch = NULL;
GetModuleFileName(NULL, gszEQPath, sizeof(gszEQPath));
if (pSearch = strstr(_strlwr(gszEQPath), "\\testeqgame.exe")) {
*pSearch=0;
}
else if (pSearch = strstr(_strlwr(gszEQPath), "\\eqgame.exe")) {
*pSearch=0;
}
sprintf(equname, "%s\\equname.txt", gszEQPath);
DebugSpew("equname = %s",equname);
FILE *fequname = fopen("equname.txt", "rt");
if(fequname) {
while (!feof(fequname)) {
fgets(szTemp,MAX_STRING,fequname);
}
fclose(fequname);
if(szTemp) {
sprintf(szOut,"%s",&szTemp);
DebugSpew("szOut = %s",szOut);
WriteChatBuffer(szOut,CONCOLOR_YELLOW);
}
}
return;
}
donations for this month's patches.Code: Select all
pChar = pCharInfo->pSpawn;Code: Select all
if (!(pChar = pCharInfo->pSpawn)) return;Please don't CVS this... I took it apart and made it a /loginname function and a $loginname variable, which will be in my next diff...EqMule00 wrote:Code: Select all
VOID GetLoginName(PSPAWNINFO pChar, PCHAR szLine) {...}
donations for this month's patches.

