Skip to content

Commit

Permalink
interface update
Browse files Browse the repository at this point in the history
  • Loading branch information
pBlueG committed Apr 24, 2014
1 parent 7e3d776 commit 809ec8a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions interfaces/RawEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface RawEvents {
const BANNED_FROM_CHAN = '474'; // banned from channel
const INVALID_CHAN_KEY = '475'; // invalid channel key
const NO_CHAN_PRIVILEGES = '482'; // requires operator to execute command
const TOPIC_REPLY = '332'; // topic reply on channel join
}

?>
4 changes: 2 additions & 2 deletions plugins/channel_log.plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @version 2.0a
*/

Class ChannelLog
Class ChannelLog implements RawEvents
{
private $m_aChannels = array();
private $m_sTable;
Expand Down Expand Up @@ -145,7 +145,7 @@ public function onChannelTopic($bot, $channel, $user, $topic, $ident)

public function onRawEvent($bot, $rawcode, $data, $server_ident)
{
if($rawcode == 332) {
if($rawcode == self::TOPIC_REPLY) {
if(in_array(strtolower($data[0]), $this->m_aChannels)) {
$time = date('[H:i:s]');
$sTopic = substr(implode(' ', array_slice($data, 1)), 1);
Expand Down

0 comments on commit 809ec8a

Please sign in to comment.