// /loginname int CMD_DisplayLoginName(int argc, char *argv[]) { PCHAR szLogin = GetLoginName(); if (!szLogin) { printf("Unable to retrieve login name."); } else { WriteChatf("Login name: \ay%s\ax",szLogin); free(szLogin); } return 0; }
int RTPContributingSources::CreateLocalCNAME() { char buf[1024]; char bufname[256]; char bufhost[256]; int status; status = gethostname(bufhost,256); if (status != 0) strcpy(bufhost,"unknown-host"); bufhost[255] = 0; GetLoginName(bufname,256); strcpy(buf,bufname); strcat(buf,"@"); strcat(buf,bufhost); return localinfo.SetSDES(TYPE_SDES_CNAME-1,buf,strlen(buf)); }