1<?php 2 3require_once(dirname(__FILE__)."/../pfccommand.class.php"); 4 5class pfcCommand_deop extends pfcCommand 6{ 7 var $usage = "/deop {nickname}"; 8 9 function run(&$xml_reponse, $p) 10 { 11 $c =& pfcGlobalConfig::Instance(); 12 $u =& pfcUserConfig::Instance(); 13 $ct =& pfcContainer::Instance(); 14 15 if (trim($p["param"]) == "") 16 { 17 // error 18 $cmdp = $p; 19 $cmdp["param"] = _pfc("Missing parameter"); 20 $cmdp["param"] .= " (".$this->usage.")"; 21 $cmd =& pfcCommand::Factory("error"); 22 $cmd->run($xml_reponse, $cmdp); 23 return; 24 } 25 26 // just change the "isadmin" meta flag 27 $nicktodeop = trim($p["param"]); 28 $nicktodeopid = $ct->getNickId($nicktodeop); 29 $ct->setUserMeta($nicktodeopid, 'isadmin', false); 30 31 $this->forceWhoisReload($nicktodeopid); 32 } 33} 34 35?>