selectuser.o servprops.o \
$(LFLAGS) -o daphne
+install:
+
+ cp daphne /usr/local/bin/./
clean:
rm -f *.o core daphne
}
-// Testing for doterm
+// doterm(inate session)
void MyFrame::DoTerm(wxCommandEvent& WXUNUSED(event))
{
- // Kill the client connection
+ // Kill the client connection and don't destroy Daphne
citadel->detach();
BigMDI->SetStatusText("Not connected");
-
+ delete TheWholist;
+ RoomList->DeleteAllItems();
}
id = cmd.GetId();
if (id == UMENU_WHO) {
+ if (citadel->IsConnected()==FALSE) {
+ wxMessageBox("You are not connected to a BBS.");
+ } else
+
//if (TheWholist == NULL)
TheWholist = new who(citadel, this);
//else
//TheWholist->Activate();
}
else if (id == UMENU_SEND_EXPRESS)
+ if (citadel->IsConnected()==FALSE) {
+ wxMessageBox("You are not connected to a BBS.");
+ } else
+
new SendExpress(citadel, this, "");
}
id = cmd.GetId();
if (id == RMENU_GOTO) {
+ if (citadel->IsConnected()==FALSE) {
+ wxMessageBox("You are not connected to a BBS.");
+ } else
+
new RoomView(citadel, this, RoomList->GetNextRoom());
}
}
}
void MyFrame::OnGotoMail(wxCommandEvent& unused) {
+ if (citadel->IsConnected()==FALSE) {
+ wxMessageBox("You are not connected to a BBS.");
+
+ } else
new RoomView(citadel, this, "_MAIL_");
}
void UserLogin::BeginSession(wxString serv_response) {
wxString junk;
+ if (citadel->IsConnected()==FALSE) {
+ citsock->curr_user = "";
+ } else
extract(citsock->curr_user, serv_response.Mid(4), 0);
BigMDI->SetStatusText(citsock->curr_user, 1);
citsock->GotoRoom("_BASEROOM_", "", junk);
"who"
) {
+
citsock = sock;
+
+
who_refresh *ref = new who_refresh(this);
// set the frame icon
wholist->InsertColumn(2, "Room", wxLIST_FORMAT_CENTER, 150);
wholist->InsertColumn(3, "From host", wxLIST_FORMAT_CENTER, 150);
+ wxLayoutConstraints *c2 = new wxLayoutConstraints;
+ c2->bottom.SameAs(this, wxBottom, 10);
+ c2->centreX.SameAs(this, wxCentreX);
+ c2->height.AsIs(); c2->width.AsIs();
+
SetAutoLayout(TRUE);
Show(TRUE);
LoadWholist();
// Load up the control
void who::LoadWholist(void) {
+
+
wxString sendcmd, recvcmd, buf;
wxString rwho;
int i = 0;
wholist->SetItem(i, 3, host);
++i;
}
-}
+ }
void who_refresh::Notify(void) {
which_who->LoadWholist();
}
+