nick = $nick = $req->post['nick']; $pass = $req->post['password']; if(!$pass) { $pass = genPass(); $this->genPass = true; } $this->netid = $this->getNetID($req->user); if(count($this->netid->nicks) >= $this->netid->nicksallowed) { $this->template = 'new-toomany'; } else if(!validNick($nick)) { $this->template = 'new-invalid'; } else { $this->ircuser = $this->getIRCUser($nick); if($this->ircuser) { $this->template = 'new-exists'; } else { $this->ircuser = new IRCUser($nick, $this->netid->netid, $pass); if(!$this->ircuser->update($this->conn)) { $this->template = 'new-error'; } else { $this->template = 'new-success'; } } } return parent::render($req); } } ?>