public override void HandleDirect(List <string> args, string username) { if (args.Count < 2) { Parent.SendChannelMessage("!tell <username> <message>"); return; } string toUsername = args.First(); args.RemoveAt(0); string toMessage = String.Join(" ", args.ToArray()); TellRecord record = new TellRecord(username, toMessage); if (tellRecords.ContainsKey(toUsername)) { tellRecords[toUsername].Add(record); } else { tellRecords.Add(toUsername, new List <TellRecord> { record }); } Parent.SendChannelMessage("{0} will be told next time they say something.", toUsername); }
public override void HandleDirect(List<string> args, string username) { if (args.Count < 2) { Parent.SendChannelMessage("!tell <username> <message>"); return; } string toUsername = args.First(); args.RemoveAt(0); string toMessage = String.Join(" ", args.ToArray()); TellRecord record = new TellRecord(username, toMessage); if (tellRecords.ContainsKey(toUsername)) tellRecords[toUsername].Add(record); else tellRecords.Add(toUsername, new List<TellRecord> { record }); Parent.SendChannelMessage("{0} will be told next time they say something.", toUsername); }