Changeset 207
- Timestamp:
- 04/04/08 19:25:17 (8 months ago)
- Files:
-
- trunk/Phergie/Plugin/Ctcp.php (modified) (1 diff)
- trunk/Phergie/Plugin/FeedTicker.php (modified) (3 diffs)
- trunk/Phergie/Plugin/Quit.php (modified) (1 diff)
- trunk/Phergie/Plugin/Toggle.php (modified) (1 diff)
- trunk/Phergie/phergie.ini (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Ctcp.php
r204 r207 6 6 class Phergie_Plugin_Ctcp extends Phergie_Plugin_Abstract_Base 7 7 { 8 /**9 * Determines if the plugin is a passive plugin or not10 *11 * @var bool12 */13 public $passive = true;14 15 8 public function onTime() 16 9 { trunk/Phergie/Plugin/FeedTicker.php
r204 r207 21 21 22 22 /** 23 * Delay in minutes between checking the queue, set to 5 minutes 24 * 25 * @var int 26 */ 27 protected $postThrottle = 5; 28 29 /** 23 30 * Feed data 24 31 * … … 93 100 public function init() 94 101 { 102 // Delay between feed syndications 103 $fetchDelay = intval($this->getPluginIni('fetch')); 104 if ($fetchDelay > 0) { 105 $this->defaultDelay = $fetchDelay * 60; 106 } 107 108 // Post throttle 109 $postThrottle = intval($this->getPluginIni('post')); 110 if ($postThrottle > 0) { 111 $this->postThrottle = $postThrottle; 112 } 113 95 114 // Global Feed Title, Feed URL and Article Title Filters 96 115 $globalTitle = trim($this->getPluginIni('filter_title')); … … 175 194 ); 176 195 } 177 $this->nextOutput = time() + 60;196 $this->nextOutput = time() + ($this->postThrottle * 60); 178 197 } 179 198 } trunk/Phergie/Plugin/Quit.php
r204 r207 207 207 208 208 /** 209 * Processes requests for the bot to disconnect from the server. 210 * 211 * @return void 212 */ 213 public function onDoExit($message = '') 214 { 215 $user = $this->event->getNick(); 216 if ($this->fromAdmin(false)) { 217 $this->handleQuit($message); 218 } else { 219 $this->doNotice($user, 'You do not have permission to use exit.'); 220 } 221 } 222 223 /** 209 224 * Reconnects to the server and rehashes the ini data 210 225 * trunk/Phergie/Plugin/Toggle.php
r205 r207 203 203 if ($instance = $this->getPlugin($plugin)) { 204 204 $for = ($target==strtolower($this->event->getSource())?'for this channel':($target=='global'?'globally':'for '.$target)); 205 if ($instance->passive && !$this->fromAdmin(false)) { 206 $this->doNotice($user, 'You do not have permission to mute passive plugins.'); 207 } else { 208 if (empty($instance->muted[$target])) { 209 $instance->muted[$target] = true; 210 $this->updateToggleState($plugin, $target, true); 211 $this->doNotice($user, 'Muted '.$plugin.' '.$for.'.'); 212 } else { 213 $this->doNotice($user, $plugin.' is already muted '.$for.'.'); 214 } 205 if (empty($instance->muted[$target])) { 206 $instance->muted[$target] = true; 207 $this->updateToggleState($plugin, $target, true); 208 $this->doNotice($user, 'Muted '.$plugin.' '.$for.'.'); 209 } else { 210 $this->doNotice($user, $plugin.' is already muted '.$for.'.'); 215 211 } 216 212 } else { trunk/Phergie/phergie.ini
r204 r207 150 150 ;----------------------------------------------------------------------------- 151 151 152 ; feedticker. delay:152 ; feedticker.fetch : 153 153 ; the frequency, in seconds, at which the feeds are checked for new data; 154 ; the default is 1800 (every 30 minutes) 155 feedticker.delay = 1800 154 ; the default is 30 minutes 155 feedticker.fetch = 30 156 157 ; feedticker.post : 158 ; the frequency, in minutes, at which new feed entries in the queue will be 159 ; sent to the channel; the default is 5 minutes 160 feedticker.post = 5 156 161 157 162 ; feedticker.format :