void greeting(void) { int messages; char dtstr[80]; if (loggedIn) terminate(FALSE, FALSE); echo = BOTH; setdefaultconfig(); initroomgen(); cleargroupgen(); if (cfg.accounting) unlogthisAccount(); delay(100); if (newCarrier) hello(); mPrintf("\n Welcome to %s, %s", cfg.nodeTitle, cfg.nodeRegion); mPrintf("\n Running %s v%s", softname, version); # ifdef ALPHA_TEST mPrintf("\n Alpha Test Site"); # endif # ifdef BETA_TEST mPrintf("\n Beta Test Site"); # endif #ifdef FLOPPY mPrintf("\n Floppy edition"); #endif doCR(); doCR(); cit_strftime(dtstr, 79, cfg.vdatestamp, 0L); mPrintf(" %s", dtstr); if (!cfg.forcelogin) { mPrintf("\n H for Help"); mPrintf("\n ? for Menu"); mPrintf("\n L to Login"); } getRoom(LOBBY); messages = talleyBuf.room[thisRoom].messages; doCR(); mPrintf(" %d %s ", messages, (messages == 1) ? "message" : "messages"); doCR(); while (MIReady()) getMod(); logBuf.linesScreen = 23; }
static Bool initCitadel(void) { if (!read_cfg_messages()) { #ifdef WINCIT char Buffer[128]; sprintf(Buffer, getmsg(188), getmsg(671)); MessageBox(NULL, Buffer, NULL, MB_ICONSTOP | MB_OK); #else printf(getmsg(188), getmsg(671)); #endif return (FALSE); } checkfiles(); initExtDrivers(); get_os(); cfg.battr = 0xff; setscreen(); logo(TRUE); // no go for debug version; td32 go crash crash init_internal_sound(); // some mouse initialization technology!!!! initMouseHandler(); hideCounter = 1; if (time(NULL) < 700000000L) { #ifdef WINCIT MessageBox(NULL, getcfgmsg(119), NULL, MB_ICONSTOP | MB_OK); #else doccr(); doccr(); cPrintf(getcfgmsg(119)); doccr(); #endif dump_cfg_messages(); return (FALSE); } static char prompt[92]; static char citadel[92]; char *envprompt; char *citprompt; envprompt = getenv(getcfgmsg(120)); citprompt = getenv(getcfgmsg(121)); if (citprompt) { sprintf(prompt, getcfgmsg(122), citprompt); } else if (envprompt) { sprintf(prompt, getcfgmsg(123), envprompt); } else { strcpy(prompt, getcfgmsg(124)); } putenv(prompt); sprintf(citadel, getcfgmsg(125), programName, version); putenv(citadel); #ifndef WINCIT OC.whichIO = CONSOLE; OC.SetOutFlag(OUTOK); OC.Echo = BOTH; OC.setio(); #endif VerifyHeap(1); // If we aren't reconfiguring, load the tables... if (!reconfig) { // Start by reading ETC.TAB getcwd(etcpath, 64); FILE *fd; if ((fd = fopen(etcTab, FO_RB)) != NULL) { if (filelength(fileno(fd)) != (long) sizeof(config) || fread(&cfg, 1, sizeof(config), fd) != (long) sizeof(config)) { memset(&cfg, 0, sizeof(cfg)); reconfig = TRUE; } fclose(fd); unlink(etcTab); // If ETC.TAB could be loaded, load the rest if (!reconfig) { changedir(cfg.homepath); allocateTables(); if (!LogTab.Load() || !MessageDat.LoadTable() || !RoomTab.Load()) { reconfig = TRUE; } Cron.ReadTable(WC_TWpn); } } else { if (!batchmode) { #ifdef WINCIT MessageBox(NULL, "No ETC.TAB.", NULL, MB_ICONSTOP | MB_OK); #else doccr(); discardable *d; if ((d = readData(6)) != NULL) { int i; for (i = 0; ((char **) d->next->aux)[i][0] != '#'; i++) { cPrintf(pcts, ((char **) d->next->aux)[i]); doccr(); } doccr(); discardData(d); } else { cOutOfMemory(28); } DeinitializeTimer(); critical(FALSE); #endif exit(1); } reconfig = TRUE; } } if (reconfig) { cfg.attr = 7; #ifndef WINCIT pause(200); cls(SCROLL_SAVE); cCPrintf(getcfgmsg(126)); doccr(); #endif if (!configcit()) { #ifdef WINCIT MessageBox(NULL, getcfgmsg(127), NULL, MB_ICONSTOP | MB_OK); #else doccr(); doccr(); cPrintf(getcfgmsg(127)); doccr(); #endif dump_cfg_messages(); return (FALSE); } #ifndef WINCIT setdefaultTerm(TT_ANSI); CurrentUser->SetWidth(80); #endif Cron.ReadCronCit(WC_TWpn); } else { #ifndef WINCIT if (!CreateScrollBackBuffer()) { cPrintf(getcfgmsg(60)); doccr(); } #endif if (readconfigcit) // forced to read in config.cit { if (!readconfig(NULL, 1)) { #ifdef WINCIT MessageBox(NULL, getcfgmsg(129), NULL, MB_ICONSTOP | MB_OK); #else doccr(); doccr(); cPrintf(getcfgmsg(129)); doccr(); #endif dump_cfg_messages(); return (FALSE); } } } VerifyHeap(1); makeBorders(); readBordersDat(); if (cmd_nobells) { cfg.noBells = 2; } if (cmd_nochat) { cfg.noChat = TRUE; } if (cmd_mdata != CERROR) { cfg.mdata = cmd_mdata; } if (*cfg.f6pass) { if (SameString(cfg.f6pass, getmsg(670))) { ConsoleLock.LockF6(); } else { ConsoleLock.Lock(); } } #ifndef WINCIT if (cfg.ovrEms) { if (_OvrInitEms(0, 0, 0)) { cPrintf(getcfgmsg(130)); doccr(); pause(200); } } if (cfg.ovrExt) { if (_OvrInitExt(0, 0)) { cPrintf(getcfgmsg(131)); doccr(); pause(200); } } CommPort->Init(); setscreen(); #endif logo(TRUE); // no go for debug version; td32 go crash crash #ifndef WINCIT StatusLine.Update(WC_TWp); #endif if (cfg.msgpath[(strlen(cfg.msgpath) - 1)] == '\\') { cfg.msgpath[(strlen(cfg.msgpath) - 1)] = '\0'; } // move to home path changedir(cfg.homepath); char FileName[128]; ReIndexFileInfo(); // keep fileinfo.dat nice and pretty // open message file if (!MessageDat.OpenMessageFile(cfg.msgpath)) { illegal(getmsg(78), MessageDat.GetFilename()); } // Then room file sprintf(FileName, sbs, cfg.homepath, roomDat); openFile(FileName, &RoomFile); citOpen(cfg.trapfile, CO_A, &TrapFile); initMenus(); dump_cfg_messages(); if(!read_tr_messages()) { errorDisp(getmsg(172)); } else { #ifdef WINCIT trap(T_SYSOP, "", gettrmsg(37)); #else trap(T_SYSOP, gettrmsg(37)); #endif dump_tr_messages(); } read_cfg_messages(); // uh-oh! if (!GroupData.Load()) { return (FALSE); } if (!HallData.Load()) { return (FALSE); } getRoomPos(); if (cfg.accounting) { ReadGrpdataCit(WC_TWpn); } ReadExternalCit(WC_TWpn); ReadProtocolCit(WC_TWpn); ReadMdmresltCit(WC_TWpn); ReadCommandsCit(WC_TWpn); #ifndef WINCIT ReadMCICit(FALSE); CurrentRoom->Load(LOBBY); thisRoom = LOBBY; checkdir(); if (!slv_door) { CITWINDOW *w = CitWindowsMsg(NULL, getmsg(19)); Initport(); Initport(); if (w) { destroyCitWindow(w, FALSE); } } else { CommPort->Enable(); } OC.whichIO = MODEM; OC.setio(); #endif // record when we put system up time(&uptimestamp); #ifndef WINCIT setdefaultconfig(FALSE); Talley->Fill(); #endif logo(FALSE); VerifyHeap(1); dump_cfg_messages(); compactMemory(1); return (TRUE); }
void TERMWINDOWMEMBER terminate(Bool discon) { char dtstr[80]; Bool initport = FALSE; if (!altF3Timeout && (cfg.chatmail == 2 && chatReq) || (cfg.chatmail == 3) || (cfg.chatmail == 4)) { if (cfg.chatmail == 2) { dispBlb(B_CHATTED); } Message *Msg = new Message; if (Msg) { msgtosysop(Msg); delete Msg; } else { OutOfMemory(41); } } if (loggedIn && onConsole) { last_console_login_callno = cfg.callno; } chatReq = FALSE; const Bool doStore = HaveConnectionToUser(); if (discon || !doStore) { sysopNew = FALSE; } const long balance = CurrentUser->GetCredits(); OC.SetOutFlag(OUTOK); if ((doStore && (MRO.Verbose == 2)) || CurrentUser->IsAutoVerbose() || CurrentUser->IsVerboseLogOut() || CurrentUser->IsNode()) { if (CurrentUser->IsNode()) { OC.SetOutFlag(IMPERVIOUS); // no carrier } CRmPrintfCR(getmsg(119), ltoac(cfg.callno)); if (loggedIn) { mPrintfCR(getmsg(118), diffstamp(logtimestamp)); } label Entered, L; CopyStringToBuffer(Entered, ltoac(MS.Entered)); mPrintfCR(getmsg(117), Entered, MS.Entered == 1 ? cfg.Lmsg_nym : cfg.Lmsgs_nym, ltoac(MS.Read)); if (cfg.accounting && CurrentUser->IsAccounting()) { long C = (CurrentUserAccount->GetBalanceAtLogin() - balance) / 60; mPrintfCR(getmsg(116), ltoac(C), (C == 1) ? cfg.Lcredit_nym : cfg.Lcredits_nym, L); C = balance / 60; mPrintfCR(getmsg(115), ltoac(C), (C == 1) ? cfg.Lcredit_nym : cfg.Lcredits_nym); } char Buffer[64]; strftime(dtstr, 79, (loggedIn) ? CurrentUser->GetVerboseDateStamp(Buffer, sizeof(Buffer)) : cfg.vdatestamp, 0l); } if (doStore && MRO.Verbose) { goodbye(); } OC.SetOutFlag(IMPERVIOUS); label Buffer; if (loggedIn) { if ((MRO.Verbose == 2) || CurrentUser->IsAutoVerbose() || CurrentUser->IsVerboseLogOut() || CurrentUser->IsNode()) { CRmPrintfCR(getmsg(614), CurrentUser->GetName(Buffer, sizeof(Buffer)), dtstr); } else { CRmPrintfCR(getmsg(114), CurrentUser->GetName(Buffer, sizeof(Buffer))); } } // Go back to the default hall thisHall = HallData.GetDefault(); if (discon) { #ifdef WINCIT switch(CommPort->GetType()) { case CT_SERIAL: { initport = TRUE; break; } case CT_TELNET: { initport = FALSE; break; } default: { initport = FALSE; break; } } #endif if (CommPort->HaveConnection()) { CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(82)); Hangup(); if (w) { destroyCitWindow(w, FALSE); } } //OC.whichIO = MODEM; // I really don't know //OC.setio(); } if (!slv_door && !CommPort->HaveConnection()) { CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(19)); #ifdef WINCIT if(initport) #endif { Initport(); } if (w) { destroyCitWindow(w, FALSE); } } CurrentUser->SetInRoom(thisRoom, TRUE); if (!doStore) // if carrier dropped { if(!read_tr_messages()) { errorDisp(getmsg(172)); } #ifdef WINCIT trap(T_CARRIER, WindowCaption, gettrmsg(19), WindowCaption); #else trap(T_CARRIER, gettrmsg(19)); #endif dump_tr_messages(); } // update new pointer only if carrier not dropped if (loggedIn && doStore) { CurrentUser->SetRoomNewPointer(thisRoom, MessageDat.NewestMessage()); } if (loggedIn) { CurrentUser->SetCallNumber(cfg.callno); CurrentUser->SetCallTime(logtimestamp); // for the Minibin() function to calculate #new messages CurrentUser->SetLastMessage(MessageDat.NewestMessage()); CurrentUser->SetTotalTime(CurrentUser->GetTotalTime() + (time(NULL) - logtimestamp)); CurrentUser->SetLogins(CurrentUser->GetLogins() + 1); CurrentUser->SetPosted(CurrentUser->GetPosted() + MS.Entered); CurrentUser->SetRead(CurrentUser->GetRead() + MS.Read); CurrentUser->Save(ThisLog, thisRoom); // this stuff puts the current room at the end of jumpback, // so J will take you back here. jumpback jb; jb.hall = thisHall; jb.room = thisRoom; jb.newpointer = CurrentUser->GetRoomNewPointer(thisRoom); jb.bypass = Talley->Bypassed(thisRoom); jb.newMsgs = Talley->NewInRoom(thisRoom); CurrentUser->JumpbackPush(jb); #ifdef MULTI char LogoffEvent[256]; label NameBuffer; sprintf(LogoffEvent, doStore ? getmsg(665) : getmsg(29), CurrentUser->GetName(NameBuffer, sizeof(NameBuffer))); TermWindowCollection.SystemEvent(SE_LOGONOFF, FALSE, NULL, FALSE, LogoffEvent); #endif loggedIn = FALSE; if (CurrentUser->IsPrintFile() && OC.Printing) { OC.Printing = OC.WasPrinting; if (!OC.Printing) { fclose(OC.PrintFile); } } // trap it if (CurrentUser->IsNode()) { if (netError) { Bool OldTrapit = cfg.trapit[T_NETWORK]; if (node->GetNetFail() > 0) { cfg.trapit[T_NETWORK] = TRUE; } else if (node->GetNetFail() < 0) { cfg.trapit[T_NETWORK] = FALSE; } #ifdef WINCIT trap(T_NETWORK, WindowCaption, getmsg(606), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_NETWORK, getmsg(606), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif cfg.trapit[T_NETWORK] = OldTrapit; } else { #ifdef WINCIT trap(T_NETWORK, WindowCaption, getmsg(22), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_NETWORK, getmsg(22), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif } } else { doEvent(EVT_LOGOUT); if(!read_tr_messages()) { errorDisp(getmsg(172)); } #ifdef WINCIT trap(T_LOGIN, WindowCaption, gettrmsg(24), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_LOGIN, gettrmsg(24), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif dump_tr_messages(); } const TrapKeywords TrapType = CurrentUser->IsNode() ? T_NETWORK : T_ACCOUNT; if(!read_tr_messages()) { errorDisp(getmsg(172)); } #ifndef WINCIT trap(TrapType, gettrmsg(25), MS.Entered); trap(TrapType, gettrmsg(26), MS.Read); #else trap(TrapType, WindowCaption, gettrmsg(25), MS.Entered); trap(TrapType, WindowCaption, gettrmsg(26), MS.Read); #endif dump_tr_messages(); if (CurrentUser->IsNode()) { if(!read_tr_messages()) { errorDisp(getmsg(172)); } #ifndef WINCIT trap(T_NETWORK, gettrmsg(20), MS.Expired); trap(T_NETWORK, gettrmsg(21), MS.Duplicate); #else trap(T_NETWORK, WindowCaption, gettrmsg(20), MS.Expired); trap(T_NETWORK, WindowCaption, gettrmsg(21), MS.Duplicate); #endif dump_tr_messages(); } else if (cfg.accounting) // There's just no accounting for nodes { if(!read_tr_messages()) { errorDisp(getmsg(172)); } #ifdef WINCIT trap(T_ACCOUNT, WindowCaption, gettrmsg(27), CurrentUserAccount->GetBalanceAtLogin() - balance); #else trap(T_ACCOUNT, gettrmsg(27), CurrentUserAccount->GetBalanceAtLogin() - balance); #endif dump_tr_messages(); } delete MS.AbortedMessage; MS.AbortedMessage = NULL; #ifdef MULTI LoginList.Remove(ThisLog); #endif } setdefaultconfig(FALSE); if (discon) { setdefaultTerm(TT_ANSI); } else { setdefaultTerm(TT_DUMB); } CurrentUser->SetCredits(discon ? 0L : cfg.unlogtimeout * 60L); StatusLine.Update(WC_TWp); Talley->Fill(); CurrentRoom->Load(LOBBY); checkdir(); thisRoom = LOBBY; AideQueueClear(); clearFileQueue(); MS.AutoMKC = AM_NONE; MS.MarkedID = 0L; freeNode(&node); netError = FALSE; // just in case Cron.ResetTimer(); }
static void pinit(ModeInfo * mi) { boxedstruct *gp = &boxed[MI_SCREEN(mi)]; int wire = MI_IS_WIREFRAME (mi); ballman *bman; int i,texpixels; char *texpixeldata; char *texpixeltarget; glShadeModel(GL_SMOOTH); glClearDepth(1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); /* Load configuration */ setdefaultconfig(&gp->config); /* give the decay parameter a better curve */ if (gp->config.decay <= 0.8182) { gp->config.decay = gp->config.decay / 3; } else { gp->config.decay = (gp->config.decay - 0.75) * 4; } bman = &gp->bman; bman->balls = (ball *)malloc(gp->config.numballs * sizeof(ball)); bman->num_balls = gp->config.numballs; bman->ballsize = gp->config.ballsize; bman->explosion = gp->config.explosion; gp->tman = (triman *)malloc(bman->num_balls * sizeof(triman)); memset(gp->tman,0,bman->num_balls * sizeof(triman)); for(i=0;i<bman->num_balls;i++) { gp->tman[i].explosion = (float) (((int)gp->config.explosion) / 15.0f ); gp->tman[i].decay = gp->config.decay; gp->tman[i].momentum = gp->config.momentum; gp->tman[i].vertices = NULL; gp->tman[i].normals = NULL; gp->tman[i].tris = NULL; createball(&bman->balls[i]); bman->balls[i].loc.y *= rnd(); } generatesphere(gp); if (!wire) { glEnable(GL_CULL_FACE); glEnable(GL_LIGHTING); } /* define cam path */ gp->cam_x_speed = 1.0f/((float)gp->config.camspeed/50.0 + rnd()*((float)gp->config.camspeed/50.0)); gp->cam_z_speed = 1.0f/((float)gp->config.camspeed/50.0 + rnd()*((float)gp->config.camspeed/50.0)); gp->cam_y_speed = 1.0f/((float)gp->config.camspeed/250.0 + rnd()*((float)gp->config.camspeed/250.0)); if (rnd() < 0.5f) gp->cam_x_speed = -gp->cam_x_speed; if (rnd() < 0.5f) gp->cam_z_speed = -gp->cam_z_speed; /* define initial cam position */ gp->tic = gp->camtic = rnd() * 100.0f; /* define tex1 (bottom plate) */ gp->tex1 = (char *)malloc(3*width*height*sizeof(GLuint)); texpixels = 256*256; /*width*height;*/ texpixeldata = header_data; texpixeltarget = gp->tex1; for (i=0; i < texpixels; i++) { HEADER_PIXEL(texpixeldata,texpixeltarget); texpixeltarget += 3; } glPixelStorei(GL_UNPACK_ALIGNMENT, 1); clear_gl_error(); #if 0 i = gluBuild2DMipmaps(GL_TEXTURE_2D, 3, 256, 256, GL_RGB, GL_UNSIGNED_BYTE, gp->tex1); if (i) { const char *s = (char *) gluErrorString (i); fprintf (stderr, "%s: error mipmapping texture: %s\n", progname, (s ? s : "(unknown)")); exit (1); } check_gl_error("mipmapping"); #else glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, gp->tex1); check_gl_error("texture"); #endif glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); }
void TERMWINDOWMEMBER greeting(void) { MRO.Verbose = FALSE; if (loggedIn) { terminate(FALSE); } OC.Echo = BOTH; OC.setio(); setdefaultconfig(FALSE); pause(10); cls(SCROLL_SAVE); doccr(); StatusLine.Update(WC_TWp); if (modStat) { if (cfg.connectwait) { CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(84)); pause(cfg.connectwait * 100); if (w) { destroyCitWindow(w, FALSE); } } CommPort->FlushInput(); } // make sure we want to talk to this baud rate if (modStat && (CommPort->GetModemSpeed() < cfg.minbaud)) { dispBlb(B_TOOLOW); CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(82)); Hangup(); pause(200); if (w) { destroyCitWindow(w, FALSE); } } else { OC.User.SetCanControlD(TRUE); // set terminal autoansi(); OC.SetOutFlag(OUTOK); if (modStat || debug) { hello(); doCR(); } OC.SetOutFlag(OUTOK); mPrintfCR(getmsg(683), cfg.nodeTitle, cfg.nodeRegion, cfg.nodeCountry); mPrintfCR(getmsg(682), cfg.softverb, *cfg.softverb ? spc : ns, programName, version); mPrintf(pcts, Author); #if VERSION != RELEASE doCR(); #ifndef HARRY CRCRmPrintfCR(" 2=== 1NOTE02 ===0"); #else CRCRmPrintfCR(" 2=== NOTE ===0"); #endif #ifndef NDEBUG CRmPrintf("This BBS is running pre-release software. Because this is a test version "); mPrintf("of the software, it has extra code to assure that things are running as "); mPrintf("they should. This may cause a noticeable slow-down in the operation of "); mPrintf("the board. Also, because this is pre-release software, it may contain "); mPrintf("bugs that could cause a loss of data. This is not likely, but it is best "); mPrintfCR("to be aware of potential problems before they surprise you."); #else mPrintf("This BBS is running pre-release software. Because this is pre-release "); mPrintf("software, it may contain "); mPrintf("bugs that could cause a loss of data. This is not likely, but it is best "); mPrintfCR("to be aware of potential problems before they surprise you."); #endif #ifndef HARRY CRmPrintfCR(" 2=== 1NOTE02 ===0"); #else CRmPrintfCR(" 2=== NOTE ===0"); #endif #endif char dtstr[80]; strftime(dtstr, 79, cfg.vdatestamp, 0l); doCR(); CRmPrintf(pcts, dtstr); if (!cfg.forcelogin) { CRmPrintf(getmsg(677)); CRmPrintf(getmsg(678)); CRmPrintf(getmsg(679)); } CurrentRoom->Load(LOBBY); checkdir(); thisRoom = LOBBY; const ulong messages = Talley->MessagesInRoom(thisRoom); CRmPrintfCR(getmsg(144), ltoac(messages), (messages == 1) ? cfg.Lmsg_nym : cfg.Lmsgs_nym); CommPort->FlushInput(); } }
Bool TERMWINDOWMEMBER net_callout(const char *nodenm) { Bool NetResult = FALSE; char String[80]; if (!read_net_messages()) { cPrintf(getmsg(59)); return (FALSE); } SetDoWhat(NETWORKING); strftime(String, sizeof(String) - 1, cfg.vdatestamp, 0l); cPrintf(getnetmsg(170), String); doccr(); #ifdef WINCIT if (!ReadNodesCit(this, &node, nodenm, MODEM, FALSE)) #else if (!ReadNodesCit(&node, nodenm, MODEM, FALSE)) #endif { cPrintf(getmsg(206), nodenm); doccr(); dump_net_messages(); return (FALSE); } // login user MS.Read = 0; MS.Entered = 0; const l_slot slot = FindPersonByName(node->GetName()); if (slot == CERROR) { cPrintf(getnetmsg(13)); dump_net_messages(); return (FALSE); } ThisSlot = slot; ThisLog = LTab(slot).GetLogIndex(); loggedIn = TRUE; label Buffer; if (CurrentUser->Load(ThisLog)) { setlbvisit(); StatusLine.Update(WC_TWp); callout = TRUE; #ifdef WINCIT trap(T_NETWORK, WindowCaption, getnetmsg(14), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_NETWORK, getnetmsg(14), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif // node logged in NetResult = net_master(); // be sure to hang up if (CommPort->HaveConnection()) { CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(82)); Hangup(); if (w) { destroyCitWindow(w, FALSE); } } // terminate user if (NetResult == TRUE) { CurrentUser->SetCallNumber(cfg.callno); time(&logtimestamp); CurrentUser->SetCallTime(logtimestamp); CurrentUser->SetLastMessage(MessageDat.NewestMessage()); storeLog(); loggedIn = FALSE; // trap it #ifdef WINCIT trap(T_NETWORK, WindowCaption, getnetmsg(15), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_NETWORK, getnetmsg(15), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif OC.SetOutFlag(IMPERVIOUS); cPrintf(getnetmsg(16), CurrentUser->GetName(Buffer, sizeof(Buffer))); delete MS.AbortedMessage; MS.AbortedMessage = NULL; #ifndef WINCIT trap(T_NETWORK, getnetmsg(17), MS.Entered); trap(T_NETWORK, getnetmsg(18), MS.Read); trap(T_NETWORK, getnetmsg(19), MS.Expired); trap(T_NETWORK, getnetmsg(20), MS.Duplicate); #else trap(T_NETWORK, WindowCaption, getnetmsg(17), MS.Entered); trap(T_NETWORK, WindowCaption, getnetmsg(18), MS.Read); trap(T_NETWORK, WindowCaption, getnetmsg(19), MS.Expired); trap(T_NETWORK, WindowCaption, getnetmsg(20), MS.Duplicate); #endif } else { loggedIn = FALSE; Bool SaveTrapit = cfg.trapit[T_NETWORK]; if (node->GetNetFail() > 0) { cfg.trapit[T_NETWORK] = TRUE; } if (node->GetNetFail() < 0) { cfg.trapit[T_NETWORK] = FALSE; } #ifdef WINCIT trap(T_NETWORK, WindowCaption, getnetmsg(21), CurrentUser->GetName(Buffer, sizeof(Buffer))); #else trap(T_NETWORK, getnetmsg(21), CurrentUser->GetName(Buffer, sizeof(Buffer))); #endif cfg.trapit[T_NETWORK] = SaveTrapit; } } else { loggedIn = FALSE; } setdefaultconfig(FALSE); // user terminated callout = FALSE; CITWINDOW *w = ScreenSaver.IsOn() ? NULL : CitWindowsMsg(NULL, getmsg(19)); Initport(); if (w) { destroyCitWindow(w, FALSE); } freeNode(&node); dump_net_messages(); return (NetResult); }