cvs: pear /Net_SmartIRC/SmartIRC messagehandler.php
| From: | Mirco 'meebey' Bauer | Date: | Sun, 08 Jun 2003 21:46:35 +0000 |
| Subject: | cvs: pear /Net_SmartIRC/SmartIRC messagehandler.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-10779@lists.php.net to get a copy of this message | ||
meebey Sun Jun 8 17:46:35 2003 EDT
Modified files:
/pear/Net_SmartIRC/SmartIRC messagehandler.php
Log:
- added debug info to _mode() method.
Index: pear/Net_SmartIRC/SmartIRC/messagehandler.php
diff -u pear/Net_SmartIRC/SmartIRC/messagehandler.php:1.15
pear/Net_SmartIRC/SmartIRC/messagehandler.php:1.16
--- pear/Net_SmartIRC/SmartIRC/messagehandler.php:1.15 Sun Jun 8 16:56:35 2003
+++ pear/Net_SmartIRC/SmartIRC/messagehandler.php Sun Jun 8 17:46:35 2003
@@ -1,9 +1,9 @@
<?php
/**
- * $Id: messagehandler.php,v 1.15 2003/06/08 20:56:35 meebey Exp $
- * $Revision: 1.15 $
+ * $Id: messagehandler.php,v 1.16 2003/06/08 21:46:35 meebey Exp $
+ * $Revision: 1.16 $
* $Author: meebey $
- * $Date: 2003/06/08 20:56:35 $
+ * $Date: 2003/06/08 21:46:35 $
*
* Copyright (c) 2002-2003 Mirco "MEEBEY" Bauer <mail@meebey.net> <http://www.meebey.net>
*
@@ -133,6 +133,7 @@
} else if ($irc->_channelsyncing == true) {
// it's not, and we do channel syching
$channel = &$irc->_channels[strtolower($ircdata->channel)];
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING: updating
channel mode for: '.$channel->name, __FILE__, __LINE__);
$mode = $ircdata->rawmessageex[3];
$parameters = array_slice($ircdata->rawmessageex, 4);
@@ -153,10 +154,12 @@
$nick = array_shift($parameters);
$lowerednick = strtolower($nick);
if ($add) {
- $channel->ops[$nick] = null;
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING:
adding op: '.$nick.' to channel: '.$channel->name, __FILE__, __LINE__);
+ $channel->ops[$nick] = true;
$channel->users[$lowerednick]->op = true;
}
if ($remove) {
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING:
removing op: '.$nick.' to channel: '.$channel->name, __FILE__, __LINE__);
unset($channel->ops[$nick]);
$channel->users[$lowerednick]->op = false;
}
@@ -165,10 +168,12 @@
$nick = array_shift($parameters);
$lowerednick = strtolower($nick);
if ($add) {
- $channel->voices[$nick] = null;
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING:
adding voice: '.$nick.' to channel: '.$channel->name, __FILE__, __LINE__);
+ $channel->voices[$nick] = true;
$channel->users[$lowerednick]->voice = true;
}
if ($remove) {
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYNCING, 'DEBUG_CHANNELSYNCING:
removing voice: '.$nick.' to channel: '.$channel->name, __FILE__, __LINE__);
unset($channel->voices[$nick]);
$channel->users[$lowerednick]->voice = false;
}
@@ -187,21 +192,21 @@
default:
// channel modes
if ($mode[$i] == 'b') {
+ $hostmask = array_shift($parameters);
if ($add) {
- $hostmask = array_shift($parameters);
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYCING,
'DEBUG_CHANNELSYCING: adding ban: '.$hostmask.' for: '.$channel->name,
__FILE__, __LINE__);
$channel->bans[$hostmask] = true;
}
if ($remove) {
- $hostmask = array_shift($parameters);
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYCING,
'DEBUG_CHANNELSYCING: removing ban: '.$hostmask.' for: '.$channel->name,
__FILE__, __LINE__);
unset($channel->bans[$hostmask]);
}
} else {
+ $irc->log(SMARTIRC_DEBUG_CHANNELSYCING, 'DEBUG_CHANNELSYCING:
storing unknown channelmode ('.$mode.') in channel->mode for: '.$channel->name,
__FILE__, __LINE__);
$channel->mode = str_replace($mode[$i], '',
$channel->mode);
}
}
}
-
- unset($channel);
}
}