wxMessageBox("You are already connected to a Citadel server.",
"Oops!");
} else {
- retval = citadel->attach("uncnsrd.mt-kisco.ny.us", "citadel");
+ retval = citadel->attach("uncnsrd", "citadel");
if (retval == 0) {
SetStatusText("** connected **");
new TestWindow(citadel, this);
h0->top.Below(humannode, 10);
h0->bottom.Above(username, -10);
h0->left.SameAs(this, wxLeft, 10);
- h0->width.SameAs(this, wxWidth, -20);
+ h0->right.SameAs(this, wxRight, 10);
hello->SetConstraints(h0);
wxLayoutConstraints *c1 = new wxLayoutConstraints;
wxLayoutConstraints *c1 = new wxLayoutConstraints;
c1->top.SameAs(this, wxTop, 10); // 10 from the top
- c1->bottom.SameAs(this, wxBottom, -10);
+ c1->bottom.SameAs(this, wxBottom, 10);
c1->left.SameAs(this, wxLeft, 10);
- c1->right.SameAs(this, wxRight, -10);
+ c1->right.SameAs(this, wxRight, 10);
wholist->SetConstraints(c1);
+ wholist->InsertColumn(0, "Session", wxLIST_FORMAT_CENTER, (-1));
+ wholist->InsertColumn(1, "User name", wxLIST_FORMAT_CENTER, (-1));
+ wholist->InsertColumn(2, "Room", wxLIST_FORMAT_CENTER, (-1));
+ wholist->InsertColumn(3, "From host", wxLIST_FORMAT_CENTER, (-1));
+
SetAutoLayout(TRUE);
Show(TRUE);
+
+ LoadWholist();
+}
+
+
+// Load up the control
+void who::LoadWholist(void) {
+ wxString sendcmd, recvcmd, buf;
+ wxStringList rwho;
+ int i;
+
+ sendcmd = "RWHO";
+ if (citsock->serv_trans(sendcmd, recvcmd, rwho) != 2) return;
+ wholist->DeleteAllItems();
+
+ for (i=0; i<rwho.Number(); ++i) {
+ buf.Printf("%s", (wxString *)rwho.Nth(i)->GetData());
+ wholist->InsertItem((long)i, buf);
+ }
}