Changeset 202
- Timestamp:
- 03/31/08 05:38:57 (8 months ago)
- Files:
-
- trunk/Phergie/Plugin/Abstract/Base.php (modified) (2 diffs)
- trunk/Phergie/Plugin/Abstract/Command.php (modified) (1 diff)
- trunk/Phergie/Plugin/Karma.php (modified) (1 diff)
- trunk/Phergie/Plugin/ModuleList.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Abstract/Base.php
r201 r202 78 78 */ 79 79 public $passive = false; 80 81 /** 82 * Flag indicating whether or not the plugin is an admin plugin or not 83 * 84 * @var bool 85 */ 86 public $needsAdmin = false; 80 87 81 88 /** … … 374 381 $data['all']['flags'][] = $flag; 375 382 // Handle the flags using bitwise operations. 1=-flag, 2=+flag, 3=Both a plus and minus 376 $data['flags'][$flag] |= (substr($match, 0, 1) === '-' ? 0x1 : 0x2); 383 if (isset($data['flags'][$flag])) { 384 $data['flags'][$flag] |= (substr($match, 0, 1) === '-' ? 0x1 : 0x2); 385 } else { 386 $data['flags'][$flag] = (substr($match, 0, 1) === '-' ? 0x1 : 0x2); 387 } 377 388 continue; 378 389 } trunk/Phergie/Plugin/Abstract/Command.php
r200 r202 15 15 private $methods; 16 16 17 /**18 * Flag indicating whether or not the plugin is an admin plugin or not19 *20 * @var bool21 */22 public $needsAdmin = false;23 17 24 18 /** trunk/Phergie/Plugin/Karma.php
r200 r202 319 319 } 320 320 } else { 321 $this->log[$host][$word]++; 321 if (isset($this->log[$host][$word])) { 322 $this->log[$host][$word]++; 323 } else { 324 $this->log[$host][$word] = 1; 325 } 322 326 } 323 327 } trunk/Phergie/Plugin/ModuleList.php
r200 r202 70 70 71 71 // Help command, return a list of all supprted commands 72 if ( $args['h']) {72 if (isset($args['h'])) { 73 73 $message = 'Help Info: '; 74 74 foreach($this->argList as $arg => $info) { … … 96 96 97 97 // Checks to see if the plugin is a muted plugin or not 98 if ($data->muted[$target] || $data->muted['global']) { 99 $pluginData['Muted'][] = $plugin . ($data->muted['global']?'*':''); 98 if ((isset($data->muted[$target]) && $data->muted[$target]) || 99 (isset($data->muted['global']) && $data->muted['global'])) { 100 $pluginData['Muted'][] = $plugin . ($data->muted['global'] ? '*' : ''); 100 101 if ($data->muted['global']) { 101 102 $pluginData['Global_Muted'][] = $plugin; … … 132 133 if ($args['v'] && is_array($pluginData)) { 133 134 foreach ($this->verboseList as $key => $value) { 134 if (is_array($pluginData[$key]) && in_array($plugin, $pluginData[$key])) { 135 if (isset($pluginData[$key]) and is_array($pluginData[$key]) && 136 in_array($plugin, $pluginData[$key])) { 135 137 $state .= $value; 136 138 }