Changeset 224
- Timestamp:
- 04/13/08 00:45:20 (7 months ago)
- Files:
-
- trunk/Phergie/Plugin/Autojoin.php (modified) (2 diffs)
- trunk/Phergie/phergie.ini (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Autojoin.php
r217 r224 16 16 */ 17 17 public $passive = true; 18 19 /** 20 * Determines if the bot will autojoin a channel on an invite request 21 * 22 * @var bool 23 */ 24 public $joinInvite = true; 25 26 /** 27 * Determines if the bot will rejoin the channel when kicked 28 * 29 * @var bool 30 */ 31 public $joinKick = true; 32 33 /** 34 * Initializes settings 35 * 36 * @return void 37 */ 38 public function init() 39 { 40 $joinInvite = $this->getPluginIni('invite'); 41 if (isset($joinInvite)) { 42 $this->joinInvite = $joinInvite; 43 } 44 45 $joinKick = $this->getPluginIni('kick'); 46 if (isset($joinKick)) { 47 $this->joinKick = $joinKick; 48 } 49 } 18 50 19 51 /** … … 56 88 } 57 89 } 90 91 /** 92 * Intercepts invite requests and will have the bot join the channel if set 93 * in the configuration. 94 * 95 * @return void 96 */ 97 public function onInvite() 98 { 99 if ($this->joinInvite) { 100 $this->doJoin($this->event->getArgument(1)); 101 } 102 } 103 104 /** 105 * Intercepts kick requests and will have the bot rejoin the channel if set 106 * in the configuration. 107 * 108 * @return void 109 */ 110 public function onKick() 111 { 112 if ($this->joinKick && 113 $this->event->getArgument(1) == $this->getIni('nick')) { 114 $this->doJoin($this->event->getArgument(0)); 115 } 116 } 58 117 } trunk/Phergie/phergie.ini
r221 r224 146 146 autojoin.channels = "" 147 147 148 ; autojoin.invite : 149 ; whether or not the bot will join a channel if an OP sent an invite request 150 ; from that channel 151 autojoin.invite = true 152 153 ; autojoin.kick : 154 ; whether or not to have the bot will rejoin a channel automatically when it 155 ; is kicked. 156 ; Note: The bot will not rejoin a channel if part is used 157 autojoin.kick = true 158 148 159 ;----------------------------------------------------------------------------- 149 160 ; Feed Ticker