Created
July 23, 2011 15:16
-
-
Save clone1018/1101538 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* OperHelper | |
* | |
* A simple plugin to help opers with their tedious tasks. | |
* | |
* @author clone1018 | |
* @copyright Copyright (c) 2008 - 2011, Axxim | |
* @link http://axxim.net/ | |
* @since Version 1.0 | |
*/ | |
class operhelper { | |
function __construct() { | |
$this->config = $config; | |
$this->bot = $bot; | |
$this->user = $user; | |
$this->plugin = json_decode(file_get_contents('./plugin.json')); | |
} | |
/** | |
* Defcon Command | |
* | |
* @return void | |
*/ | |
public function defcon($user, $channel, $args) { | |
if ($this->isAdmin($user)) { | |
$defcon = "DEFCON " . $args[0]; | |
$this->bot->say_message("OPERSERV", $defcon); | |
echo $this->bot->say_message("OPERSERV", $defcon); | |
} | |
} | |
/** | |
* hasoper Function | |
* | |
* @return boolean | |
*/ | |
private function hasoper() { | |
if ($this->user->oper($user)) { | |
return true; | |
} else { | |
return false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment