private void Command_Auction(string user, Command cmd, string[] args, string origin) { if (args.Length > 0) { if (args[0].ToLower() == "open") { if (!Auction.Open) { Auction.Start(); Chat.SendMessage("Auction open! Bid by typing \"!bid {amount}\", etc."); } else { Chat.SendMessage("Auction already open. Close or cancel the previous one first."); } } else if (args[0].ToLower() == "close") { if (Auction.Open) { KeyValuePair <string, int> winner = Auction.Close(); Chat.SendMessage("Auction closed! Winner is: " + winner.Key + " (" + winner.Value + ")"); } else { Chat.SendMessage("No auction open."); } } else if (args[0].ToLower() == "cancel") { if (Auction.Open) { Auction.Cancel(); Chat.SendMessage("Auction cancelled. Bids refunded."); } else { Chat.SendMessage("No auction open."); } } } }
public static void Cancel() { Auction.Cancel(); }
private void Events_OnDisconnect() { Auction.Cancel(); }