bot->sqlLevelCache.insert(cservice::sqlLevelHashType::value_type(thePair, newManager));
/* set channel mode R - tmpChan is created further above */
+ stringstream tmpTS;
+ tmpTS << channel_ts;
+ string channelTS = tmpTS.str();
+
if (tmpChan)
- bot->getUplink()->Mode(NULL, tmpChan, string("+R"), string() );
+ bot->getUplink()->Mode(NULL, tmpChan, string("+R"), channelTS );
bot->getUplink()->RegisterChannelEvent(st[1],bot);
return true;
}
}
MyUplink->RegisterChannelEvent( theChan->getName(), this ) ;
+
+ tmpChan = Network->findChannel(theChan->getName());
+ if (tmpChan && tmpChan->getCreationTime() < theChan->getChannelTS())
+ theChan->setChannelTS(tmpChan->getCreationTime());
+
if (theChan->getFlag(sqlChannel::F_AUTOJOIN))
{
string tempModes = theChan->getChannelMode();
if (getConfigVar("BAN_CHECK_ON_BURST")->asInt() == 1)
{
/* check current inhabitants of the channel against our banlist */
- tmpChan = Network->findChannel(theChan->getName());
for (Channel::userIterator chanUsers = tmpChan->userList_begin();
chanUsers != tmpChan->userList_end(); ++chanUsers)
{
/* although AUTOJOIN isn't set, set the channel to +R if
* it exists on the Network.
*/
- tmpChan = Network->findChannel(theChan->getName());
if (tmpChan)
{
- string tempModes = "+R";
- MyUplink->Mode(NULL, tmpChan, tempModes, string() );
+ stringstream tmpTS;
+ tmpTS << theChan->getChannelTS();
+ string channelTS = tmpTS.str();
+ MyUplink->Mode(NULL, tmpChan, string("+R"), channelTS );
}
}
++ptr;
/* This is a registered channel, check it is set +R.
* If not, set it to +R (channel creation)
*/
- if (!theChan->getMode(Channel::MODE_REG))
- MyUplink->Mode(NULL, theChan, string("+R"), string() );
+ if (!theChan->getMode(Channel::MODE_REG)) {
+ stringstream tmpTS;
+ tmpTS << reggedChan->getChannelTS();
+ string channelTS = tmpTS.str();
+ MyUplink->Mode(NULL, theChan, string("+R"), channelTS );
+ }
/* If this is a registered channel, but we're not in it -
* then we're not interested in the following commands!
case 'n':
case 'p':
case 'r':
- case 'R':
case 's':
case 't':
case 'D':
polarityString + theChar,
string() ) ) ;
break ;
+ case 'R':
+ /* mod.cservice setting +R with a TS */
+ if( nextArgIndex < st.size() && polarityBool ) {
+ std::string TS = st[ nextArgIndex ] ;
+ ++nextArgIndex ;
+ modeVector.push_back( make_pair(
+ polarityBool,
+ chanModes[ theChar ] ) ) ;
+ rawModeVector.push_back( make_pair(
+ polarityString + theChar,
+ TS ) ) ;
+ } else {
+ modeVector.push_back( make_pair(
+ polarityBool,
+ chanModes[ theChar ] ) ) ;
+ rawModeVector.push_back( make_pair(
+ polarityString + theChar,
+ string() ) ) ;
+ }
+ break;
case 'k':
{
// elog << "xServer::Mode> Mode 'k'"