示例#1
0
 public function onChangeTopic(Bot $pBot, $sChannel, $sNickname, $sNewTopic)
 {
     if ($sNickname === $pBot->offsetGet('Nickname')) {
         // It's us!
         return;
     }
     if ($this->m_aChannels[$sChannel]['Locked'] === true) {
         // Topic is locked, lets try to reset it.
         $pBot->send('TOPIC ' . $sChannel . ' :' . $this->m_aChannels[$sChannel]['Topic']);
     } else {
         // Topic is not locked, lets store it
         $this->setTopic($sChannel, $sNewTopic);
     }
 }