public void Prompt() { bool quitflag = false; while ((!quitflag) && _bbs.Connected) { //Show Main Prompt _bbs.Write("~l1~c1SysOp~c2:~c7"); string command = _bbs.Input(true, false, false); if (command.Length == 1) { switch (command.Substring(0, 1).ToUpper()) { case "H": _bbs.SendFileForTermType("sysop_help", true); break; case "Q": quitflag = true; break; default: _bbs.WriteLine("~l1~d2Unknown command.~d0~c1"); break; } } else { if (command.Length >= 2) { switch (command.Substring(0, 2).ToUpper()) { case "LG": //List Access Groups CMD_ListGroups(); break; case "AG": //Add Access Group CMD_ListGroups(); break; case "EG": //Edit Access Group CMD_ListGroups(); break; case "RG": //Remove Access Group CMD_ListGroups(); break; default: _bbs.WriteLine("~l1~d2Unknown command.~d0~c1"); break; } } } } }
public void Prompt() { bool quitflag = false; while ((!quitflag) && _bbs.Connected) { //Show Main Prompt _bbs.WriteLine("~c7H~c1elp~c2, ~c7L~c1ist~c2, ~c7R~c1ead~c2, ~c7Q~c1uit"); _bbs.Write("~c1News~c2: ~c7:"); string command = _bbs.Input(true, false, false); switch (command.ToUpper()[0]) { case 'B': break; case 'U': break; case 'G': break; case 'P': break; case 'Q': quitflag = true; break; } } }
public void Prompt() { bool quitflag = false; while ((!quitflag) && _bbs.Connected) { //Show Main Prompt _bbs.WriteLine("~l1~c7H~c1elp~c2, ~c7L~c1ist~c2, ~c7Q~c1uit"); _bbs.Write("~c1PFiles~c2:~c7"); string command = _bbs.Input(true, false, false); if (command.Length > 0) { if ("0123456789".Contains(command.Substring(0, 1))) { //Select item. IdAndKeys selectedItem = Current_Area_List.FirstOrDefault(p => p.Keys["listid"].Equals(command)); if (selectedItem != null) { if (selectedItem.Keys["type"] == "area") { ChangeToArea(selectedItem.Id); } else { //Run this file RunPFile(selectedItem.Keys["title"]); } } } else { switch (command.ToUpper()[0]) { case 'H': _bbs.SendFileForTermType("pfile_help", true); break; case 'L': CMD_List(); break; case '/': if (Current_Pfile_Area > -1) { ChangeToArea(_dataInterface.PFile_ParentArea(Current_Pfile_Area)); } break; case 'Q': quitflag = true; break; } } } } }
public User LogIn() { _bbs.CurrentArea = "Logging In"; User u = null; try { string uname = ""; string pass = ""; int bigtries = 0; while (_bbs.Connected && bigtries < 3) { int tries = 0; while (_bbs.Connected && tries < 3) { _bbs.Write("~l2~c1Username~c2: ~c7"); uname = _bbs.Input(true, false, false, true, 30); if (uname.ToUpper() == "NEW") { break; } else { _bbs.Write("~l1~c1Password~c2: ~c7"); pass = _bbs.Input(true, true, false, false, 30); if ((uname == "") || (pass == "")) { tries++; } else { break; } } } if (tries < 3) { if (uname.ToUpper() == "NEW") { NewUser nu = new NewUser(_bbs, _dataInterface); if (nu.Application()) { u = _dataInterface.Login(nu.Username, nu.Password); } break; } else { //Username and pass have been filled in u = _dataInterface.Login(uname, pass); if (u != null) { break; } } } else { BuggerOff(); } if (u == null) { bigtries++; } } if (u != null) { _bbs.WriteLine("~l1~c1Welcome, ~c7" + u.Username.ToUpper() + "~c1.~l4"); } else { BuggerOff(); } } catch (Exception e) { LoggingAPI.LogEntry("Exception in Login.LogIn: " + e.Message); } return(u); }
public void Prompt() { bool quitflag = false; while ((!quitflag) && _bbs.Connected) { //Show Main Prompt if (!_bbs.ExpertMode) { _bbs.WriteLine("~l1~c7H~c1elp~c2, ~c7L~c1ist~c2, ~c7Q~c1uit"); } else { _bbs.WriteLine(); } _bbs.Write("~c1GFiles~c2:~c7"); string command = _bbs.Input(true, false, false); if (command.Length > 0) { if ("0123456789".Contains(command.Substring(0, 1))) { //Select item. IdAndKeys selectedItem = Current_Area_List.FirstOrDefault(p => p.Keys["listid"].Equals(command)); if (selectedItem != null) { if (selectedItem.Keys["type"] == "area") { ChangeToArea(selectedItem.Id); } else { //Show this file CMD_Read(int.Parse(selectedItem.Keys["gfiledetailid"])); } } } else { switch (command.ToUpper()[0]) { case 'H': _bbs.SendFileForTermType("gfile_help", true); break; case 'L': CMD_List(); break; case '/': if (Current_Gfile_Area > -1) { ChangeToArea(_dataInterface.GFile_ParentArea(Current_Gfile_Area)); } break; case 'Q': quitflag = true; break; default: if (_bbs.Sysop_Identified) { CMD_SysOp(command); } else { _bbs.WriteLine("~l1~d2Unknown command.~d0~c1"); } break; } } } } }