Changeset 218
- Timestamp:
- 04/08/08 02:22:36 (8 months ago)
- Files:
-
- trunk/Phergie/Driver/Abstract.php (modified) (2 diffs)
- trunk/Phergie/Plugin/Abstract/Command.php (modified) (1 diff)
- trunk/Phergie/Plugin/Acronym.php (modified) (1 diff)
- trunk/Phergie/Plugin/Dice.php (modified) (1 diff)
- trunk/Phergie/Plugin/Drink.php (modified) (1 diff)
- trunk/Phergie/Plugin/FeedTicker.php (modified) (1 diff)
- trunk/Phergie/Plugin/Karma.php (modified) (2 diffs)
- trunk/Phergie/Plugin/ModuleList.php (modified) (1 diff)
- trunk/Phergie/Plugin/Users.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Driver/Abstract.php
r217 r218 56 56 public final function setIni($name, $value) 57 57 { 58 $this->config[strtolower($name) ] = $value;58 $this->config[strtolower($name)] = $value; 59 59 } 60 60 … … 137 137 public function addPlugin(Phergie_Plugin_Abstract_Base $plugin) 138 138 { 139 $this->plugins[strtolower($plugin->getName()) ] = $plugin;139 $this->plugins[strtolower($plugin->getName())] = $plugin; 140 140 } 141 141 trunk/Phergie/Plugin/Abstract/Command.php
r217 r218 43 43 $name = $method->getName(); 44 44 if (strpos($name, 'onDo') === 0) { 45 $this->methods[strtolower(substr($name, 4)) ] = array(45 $this->methods[strtolower(substr($name, 4))] = array( 46 46 $method->getNumberOfParameters(), 47 47 $method->getNumberOfRequiredParameters() trunk/Phergie/Plugin/Acronym.php
r217 r218 78 78 { 79 79 do { 80 $reaction = $this->reactions[mt_rand(0, count($this->reactions) - 1)];80 $reaction = $this->reactions[mt_rand(0, count($this->reactions) - 1)]; 81 81 $randomUser = (strpos($reaction, '%randomuser%') !== false); 82 82 } while ($target[0] != '#' && $randomUser); trunk/Phergie/Plugin/Dice.php
r217 r218 126 126 $total = 0; 127 127 for ($d = 0; $d < $dice; $d++) { 128 $total += intval(mt_rand(1, $sides) + ($operator ? $bonus : ($bonus*-1)));128 $total += intval(mt_rand(1, $sides) + ($operator ? $bonus : ($bonus * -1))); 129 129 } 130 130 $output[] = $total; trunk/Phergie/Plugin/Drink.php
r217 r218 124 124 break; 125 125 } 126 $this->debug('Parsing data for: Cocktail (' . $i . ' - ' . ($i +150) . ')');126 $this->debug('Parsing data for: Cocktail (' . $i . ' - ' . ($i + 150) . ')'); 127 127 if ($i == 1) { 128 128 preg_match('/>([0-9]+) found\\.</', $contents, $match); trunk/Phergie/Plugin/FeedTicker.php
r217 r218 195 195 ), $this->format)); 196 196 } 197 $this->nextOutput = time() + ($this->postThrottle*60);197 $this->nextOutput = time() + ($this->postThrottle * 60); 198 198 } 199 199 } trunk/Phergie/Plugin/Karma.php
r217 r218 135 135 $static = $this->getPluginIni('static'); 136 136 if ($static) { 137 $this->fixedKarma[strtolower($this->getIni('nick')) ] = $static;137 $this->fixedKarma[strtolower($this->getIni('nick'))] = $static; 138 138 } 139 139 … … 332 332 $res = $this->fetchKarma->fetch(PDO::FETCH_ASSOC); 333 333 if ($res) { 334 $karma = ($res['karma'] +($sign == '++' ? 1 : -1));334 $karma = ($res['karma'] + ($sign == '++' ? 1 : -1)); 335 335 $args = array( 336 336 ':word' => $word, trunk/Phergie/Plugin/ModuleList.php
r217 r218 65 65 if ($arg == 'mg' || $arg == 'mutedglobal') $arg = 'g'; 66 66 else if ($arg == 'ml' || $arg == 'mutedlocal') $arg = 'l'; 67 $args[substr(strtolower($arg), 0, 1) ] = $value;67 $args[substr(strtolower($arg), 0, 1)] = $value; 68 68 } 69 69 unset($rawArgs); trunk/Phergie/Plugin/Users.php
r216 r218 197 197 $flag |= self::VOICE; 198 198 } 199 self::$list[trim(strtolower($chan)) ][trim(strtolower($user))] = $flag;199 self::$list[trim(strtolower($chan))][trim(strtolower($user))] = $flag; 200 200 } 201 201 }