public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length == 0 || args[0].Trim() == string.Empty) { return; } if (controller.NickNameInUse(args[0])) { new NicknameInUseError { SenderAddress = Server.HostName, SenderNickName = client.NickName, AttemptedNickName = args[0] }.SendMessageToClient(client); return; } client.NickName = args[0]; // Attempt to activate the user client.AttemptUserActivation(); client.SetUserMask(); }
public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length < 4) { var replyCommand = new NeedMoreParamsError { Command = "USER", SenderAddress = Server.HostName }; client.SendMessage(replyCommand.FormFullResponseString()); return; } client.FullName = args[3]; client.UserName = args[0]; var connectUserId = Server.EEGuestClient.BigDB.Load("Usernames", client.UserName.ToLower()).GetString("owner", ""); if (!connectUserId.StartsWith("simple")) { new WelcomeReply() { Message = "Whoops! You are attempting to connect with a non-simple user, which is currently unsupported." }.SendMessageToClient(client); return; } client.UsernameOrEmail = connectUserId.Remove(0, "simple".Length); client.AttemptUserActivation(); client.SetUserMask(); }
public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length < 1) { return; } client.Password = args[0]; client.AttemptUserActivation(); }
public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length < 4) { var replyCommand = new NeedMoreParamsError { Command = "USER", SenderAddress = Server.HostName }; client.SendMessage(replyCommand.FormFullResponseString()); return; } client.FullName = args[3]; client.UserName = args[0]; // Attempt to activate the user client.AttemptUserActivation(); client.SetUserMask(); }
public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length < 4) { var replyCommand = new NeedMoreParamsError { Command = "USER", SenderAddress = Server.HostName }; client.SendMessage(replyCommand.FormFullResponseString()); return; } client.FullName = args[3]; client.UserName = args[0]; // Attempt to activate the user client.AttemptUserActivation(); client.SetUserMask(); }
public void ProcessCommand(string[] args, IrcClient client, IrcController controller) { if (args.Length == 0 || args[0].Trim() == string.Empty) return; if (controller.NickNameInUse(args[0])) { new NicknameInUseError { SenderAddress = Server.HostName, SenderNickName = client.NickName, AttemptedNickName = args[0] }.SendMessageToClient(client); return; } client.NickName = args[0]; // Attempt to activate the user client.AttemptUserActivation(); client.SetUserMask(); }