]> code.citadel.org Git - citadel.git/commitdiff
Added some checks for connectivity. The roomview commands were locking
authorSteve Williams <patriot@uncensored.citadel.org>
Mon, 15 Nov 1999 05:05:13 +0000 (05:05 +0000)
committerSteve Williams <patriot@uncensored.citadel.org>
Mon, 15 Nov 1999 05:05:13 +0000 (05:05 +0000)
Daphne if the program wasn't connected.  Now it's not.  All nice and
stable.

daphne/ChangeLog
daphne/roomview.cpp
daphne/who.cpp

index 0246751cedb73439494ca6a0a67d41818b3e4ed6..74a7c7794deb21a0e6eced3e6f0aa1d2cbda94bb 100644 (file)
@@ -1,4 +1,9 @@
-$Log$
+ $Log$
+ Revision 1.10  1999/11/15 05:05:13  smw
+ Added some checks for connectivity.  The roomview commands were locking
+ Daphne if the program wasn't connected.  Now it's not.  All nice and
+ stable.
+
 Revision 1.9  1999/11/15 04:19:18  smw
 Killed the refresh timer in who.cpp
 Updated the who function so that refreshes are no longer automated, but
index 1f7030606b9eefeaab6b48f45629f6586854947c..1e0fc77ae0f38872eb83e947e0aa17c5c7846ade 100644 (file)
@@ -226,20 +226,42 @@ void RoomView::OnButtonPressed(wxCommandEvent& whichbutton) {
        if (whichbutton.GetId() == BUTTON_CLOSE) {
                delete this;
 /*     } else if (whichbutton.GetId() == BUTTON_READNEW) { 
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
                do_readloop("MSGS NEW"); */
        } else if (whichbutton.GetId() == BUTTON_READALL) {
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
+               return;
+               } else
                do_readloop("MSGS ALL");
        } else if (whichbutton.GetId() == BUTTON_ENTER) {
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
+               return;
+               } else
                new EnterMessage(citsock, citMyMDI, ThisRoom, RoomFlags);
        } else if (whichbutton.GetId() == BUTTON_SKIP) {
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
+               return;
+               } else
                new RoomView(citsock, citMyMDI, RoomList->GetNextRoom());
                delete this;
        } else if (whichbutton.GetId() == BUTTON_GOTO) {
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
+               return;
+               } else
                sendcmd = "SLRP HIGHEST";       // mark messages as read
                citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
                new RoomView(citsock, citMyMDI, RoomList->GetNextRoom());
                delete this;
        } else if (whichbutton.GetId() == BUTTON_ZAP) {
+               if (citadel->IsConnected()==FALSE) {
+               wxMessageBox("You are not connected to a BBS.");
+               return;
+               } else
                sendcmd = "FORG";               //Zap (forget) room
                citsock->serv_trans(sendcmd, recvcmd, xferbuf, ThisRoom);
                new RoomView(citsock, citMyMDI, "_BASEROOM_"); 
index 0186de608874b07084847f663633e25c623c0192..8476fa63336d075723eeaed8ef1ae601d8796581 100644 (file)
@@ -156,6 +156,7 @@ void who::LoadWholist(void) {
                return; }
                 if (citadel->IsConnected()==FALSE) { 
                 wxMessageBox("You are not connected to a BBS."); 
+               wholist->DeleteAllItems();
                return; 
         } else