From 809ec8a2e1af86c7ba18c725999d4177669fc0f6 Mon Sep 17 00:00:00 2001 From: pBlueG Date: Thu, 24 Apr 2014 23:53:54 +0200 Subject: [PATCH] interface update --- interfaces/RawEvents.php | 1 + plugins/channel_log.plugin.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/interfaces/RawEvents.php b/interfaces/RawEvents.php index 82eaa3c..3832244 100644 --- a/interfaces/RawEvents.php +++ b/interfaces/RawEvents.php @@ -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 } ?> \ No newline at end of file diff --git a/plugins/channel_log.plugin.php b/plugins/channel_log.plugin.php index f6837e8..03d152f 100644 --- a/plugins/channel_log.plugin.php +++ b/plugins/channel_log.plugin.php @@ -9,7 +9,7 @@ * @version 2.0a */ -Class ChannelLog +Class ChannelLog implements RawEvents { private $m_aChannels = array(); private $m_sTable; @@ -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);