userdb -> addUser($nick, $pw); $this -> userdb -> setLevel($nick, 1); $this -> call("notice", $nick, "Your current password: ".$pw); $this -> call("notice", $nick, "Your current level: 1"); $this -> call("notice", $nick, "In order to change your password, type: /msg ".$this -> nick." identify ".$pw." and /msg ".$this -> nick." password "); break; case "del": $this -> userdb -> delUser($nick); $this -> call("privmsg", $recv["origin"], "User '".$nick."' deleted."); break; case "level": $this -> userdb -> setLevel($nick, $recv["msgarr"][3]); $this -> call("notice", $nick, "Your new level: ".$recv["msgarr"][3]); break; case "list": $list = $this -> userdb -> listUsers(); foreach($list as $user => $level){ $users[] = $user."(".$level.")"; } $this -> call("notice", $recv["nick"], "Users: ".implode(", ", $users)); break; case "help": $this -> call("notice", $recv["nick"], "Available commands: list, add , level , del , help (level 3+)"); break; default: $this -> call("notice", $recv["nick"], "Unknown user command! Type ".$this -> prefix."user help for further information"); break; } ?>