|
|
|
@ -463,7 +463,7 @@ bool& isOp,bool& isHalfop,bool& hasVoice)
|
|
|
|
|
|
|
|
|
|
if (nickname.isEmpty()) return;
|
|
|
|
|
|
|
|
|
|
while ((modeIndex = m_serverNickPrefixes.tqfind(nickname[0])) != -1)
|
|
|
|
|
while ((modeIndex = m_serverNickPrefixes.find(nickname[0])) != -1)
|
|
|
|
|
{
|
|
|
|
|
if(nickname.isEmpty())
|
|
|
|
|
return;
|
|
|
|
@ -741,7 +741,7 @@ void Server::notifyResponse(const TQString& nicksOnline)
|
|
|
|
|
//Are any nicks gone offline
|
|
|
|
|
for (it = m_prevISONList.begin(); it != m_prevISONList.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if (lcActual.tqfind(' ' + (*it) + ' ', 0, false) == -1)
|
|
|
|
|
if (lcActual.find(' ' + (*it) + ' ', 0, false) == -1)
|
|
|
|
|
{
|
|
|
|
|
setNickOffline(*it);
|
|
|
|
|
nicksOnlineChanged = true;
|
|
|
|
@ -751,7 +751,7 @@ void Server::notifyResponse(const TQString& nicksOnline)
|
|
|
|
|
//Are any nicks gone online
|
|
|
|
|
for (it = actualList.begin(); it != actualList.end(); ++it)
|
|
|
|
|
{
|
|
|
|
|
if (lcPrevISON.tqfind(' ' + (*it) + ' ', 0, false) == -1) {
|
|
|
|
|
if (lcPrevISON.find(' ' + (*it) + ' ', 0, false) == -1) {
|
|
|
|
|
setWatchedNickOnline(*it);
|
|
|
|
|
nicksOnlineChanged = true;
|
|
|
|
|
}
|
|
|
|
@ -798,7 +798,7 @@ void Server::autoCommandsAndChannels()
|
|
|
|
|
TQString connectCommands = getServerGroup()->connectCommands();
|
|
|
|
|
|
|
|
|
|
if (!getNickname().isEmpty())
|
|
|
|
|
connectCommands.tqreplace("%nick", getNickname());
|
|
|
|
|
connectCommands.replace("%nick", getNickname());
|
|
|
|
|
|
|
|
|
|
TQStringList connectCommandsList = TQStringList::split(";", connectCommands);
|
|
|
|
|
TQStringList::iterator iter;
|
|
|
|
@ -831,7 +831,7 @@ void Server::resetNickSelection()
|
|
|
|
|
//for equivalence testing in case the identity gets changed underneath us
|
|
|
|
|
m_referenceNicklist = getIdentity()->getNicknameList();
|
|
|
|
|
//where in this identities nicklist will we have started?
|
|
|
|
|
int start = m_referenceNicklist.tqfindIndex(getNickname());
|
|
|
|
|
int start = m_referenceNicklist.findIndex(getNickname());
|
|
|
|
|
int len = m_referenceNicklist.count();
|
|
|
|
|
|
|
|
|
|
//we first use this list of indices *after* we've already tried the current nick, which we don't want
|
|
|
|
@ -877,7 +877,7 @@ void Server::processIncomingData()
|
|
|
|
|
if (m_rawLog)
|
|
|
|
|
{
|
|
|
|
|
TQString toRaw = front;
|
|
|
|
|
m_rawLog->appendRaw(">> " + toRaw.tqreplace("&","&").tqreplace("<","<").tqreplace(">",">").tqreplace(TQRegExp("\\s"), " "));
|
|
|
|
|
m_rawLog->appendRaw(">> " + toRaw.replace("&","&").replace("<","<").replace(">",">").replace(TQRegExp("\\s"), " "));
|
|
|
|
|
}
|
|
|
|
|
m_inputFilter.parseLine(front);
|
|
|
|
|
m_processingIncoming = false;
|
|
|
|
@ -921,7 +921,7 @@ void Server::incoming()
|
|
|
|
|
// split buffer to lines
|
|
|
|
|
TQValueList<TQCString> qcsBufferLines;
|
|
|
|
|
int lastLFposition = -1;
|
|
|
|
|
for( int nextLFposition ; ( nextLFposition = qcsBuffer.tqfind('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition )
|
|
|
|
|
for( int nextLFposition ; ( nextLFposition = qcsBuffer.find('\n', lastLFposition+1) ) != -1 ; lastLFposition = nextLFposition )
|
|
|
|
|
qcsBufferLines << qcsBuffer.mid(lastLFposition+1, nextLFposition-lastLFposition-1);
|
|
|
|
|
|
|
|
|
|
// remember the incomplete line (split by packets)
|
|
|
|
@ -943,10 +943,10 @@ void Server::incoming()
|
|
|
|
|
{
|
|
|
|
|
if( lineSplit[0][0] == ':' ) // does this message have a prefix?
|
|
|
|
|
{
|
|
|
|
|
if( !lineSplit[0].tqcontains('!') ) // is this a server(global) message?
|
|
|
|
|
if( !lineSplit[0].contains('!') ) // is this a server(global) message?
|
|
|
|
|
isServerMessage = true;
|
|
|
|
|
else
|
|
|
|
|
senderNick = lineSplit[0].mid(1, lineSplit[0].tqfind('!')-1);
|
|
|
|
|
senderNick = lineSplit[0].mid(1, lineSplit[0].find('!')-1);
|
|
|
|
|
|
|
|
|
|
lineSplit.pop_front(); // remove prefix
|
|
|
|
|
}
|
|
|
|
@ -1056,7 +1056,7 @@ int Server::_send_internal(TQString outputLine)
|
|
|
|
|
{
|
|
|
|
|
TQStringList outputLineSplit=TQStringList::split(" ", outputLine);
|
|
|
|
|
//Lets cache the uppercase command so we don't miss or reiterate too much
|
|
|
|
|
int outboundCommand=outcmds.tqfindIndex(outputLineSplit[0].upper());
|
|
|
|
|
int outboundCommand=outcmds.findIndex(outputLineSplit[0].upper());
|
|
|
|
|
|
|
|
|
|
if (outputLine.at(outputLine.length()-1) == '\n')
|
|
|
|
|
{
|
|
|
|
@ -1099,7 +1099,7 @@ int Server::_send_internal(TQString outputLine)
|
|
|
|
|
TQString blowfishKey=getKeyForRecipient(outputLineSplit[1]);
|
|
|
|
|
if (!blowfishKey.isEmpty() && outboundCommand >1)
|
|
|
|
|
{
|
|
|
|
|
int colon = outputLine.tqfind(':');
|
|
|
|
|
int colon = outputLine.find(':');
|
|
|
|
|
if (colon > -1)
|
|
|
|
|
{
|
|
|
|
|
colon++;
|
|
|
|
@ -1136,7 +1136,7 @@ int Server::_send_internal(TQString outputLine)
|
|
|
|
|
TQ_LONG sout = m_socket->writeBlock(encoded, encoded.length());
|
|
|
|
|
|
|
|
|
|
if (m_rawLog)
|
|
|
|
|
m_rawLog->appendRaw("<< " + outputLine.tqreplace("&","&").tqreplace("<","<").tqreplace(">",">"));
|
|
|
|
|
m_rawLog->appendRaw("<< " + outputLine.replace("&","&").replace("<","<").replace(">",">"));
|
|
|
|
|
|
|
|
|
|
return sout;
|
|
|
|
|
}
|
|
|
|
@ -1279,7 +1279,7 @@ void Server::ctcpReply(const TQString &receiver,const TQString &text)
|
|
|
|
|
NickInfoPtr Server::getNickInfo(const TQString& nickname)
|
|
|
|
|
{
|
|
|
|
|
TQString lcNickname(nickname.lower());
|
|
|
|
|
if (m_allNicks.tqcontains(lcNickname))
|
|
|
|
|
if (m_allNicks.contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
NickInfoPtr nickinfo = m_allNicks[lcNickname];
|
|
|
|
|
Q_ASSERT(nickinfo);
|
|
|
|
@ -1310,7 +1310,7 @@ const NickInfoMap* Server::getAllNicks() { return &m_allNicks; }
|
|
|
|
|
const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelName) const
|
|
|
|
|
{
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
if (m_joinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_joinedChannels.contains(lcChannelName))
|
|
|
|
|
return m_joinedChannels[lcChannelName];
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
@ -1322,7 +1322,7 @@ const ChannelNickMap *Server::getJoinedChannelMembers(const TQString& channelNam
|
|
|
|
|
const ChannelNickMap *Server::getUnjoinedChannelMembers(const TQString& channelName) const
|
|
|
|
|
{
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
if (m_unjoinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_unjoinedChannels.contains(lcChannelName))
|
|
|
|
|
return m_unjoinedChannels[lcChannelName];
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
@ -1348,7 +1348,7 @@ ChannelNickPtr Server::getChannelNick(const TQString& channelName, const TQStrin
|
|
|
|
|
const ChannelNickMap *channelNickMap = getChannelMembers(channelName);
|
|
|
|
|
if (channelNickMap)
|
|
|
|
|
{
|
|
|
|
|
if (channelNickMap->tqcontains(lcNickname))
|
|
|
|
|
if (channelNickMap->contains(lcNickname))
|
|
|
|
|
return (*channelNickMap)[lcNickname];
|
|
|
|
|
else
|
|
|
|
|
return 0;
|
|
|
|
@ -1375,7 +1375,7 @@ ChannelNickPtr Server::setChannelNick(const TQString& channelName, const TQStrin
|
|
|
|
|
// Create a lower case nick list from the watch list.
|
|
|
|
|
TQStringList watchLowerList=TQStringList::split(' ',watchlist.lower());
|
|
|
|
|
// If on the watch list, add channel and nick to unjoinedChannels list.
|
|
|
|
|
if (watchLowerList.tqfind(lcNickname) != watchLowerList.end())
|
|
|
|
|
if (watchLowerList.find(lcNickname) != watchLowerList.end())
|
|
|
|
|
{
|
|
|
|
|
channelNick = addNickToUnjoinedChannelsList(channelName, nickname);
|
|
|
|
|
channelNick->setMode(mode);
|
|
|
|
@ -1395,7 +1395,7 @@ TQStringList Server::getNickJoinedChannels(const TQString& nickname)
|
|
|
|
|
ChannelMembershipMap::ConstIterator channel;
|
|
|
|
|
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
|
|
|
|
|
{
|
|
|
|
|
if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
}
|
|
|
|
|
return channellist;
|
|
|
|
|
}
|
|
|
|
@ -1408,11 +1408,11 @@ TQStringList Server::getNickChannels(const TQString& nickname)
|
|
|
|
|
ChannelMembershipMap::ConstIterator channel;
|
|
|
|
|
for( channel = m_joinedChannels.begin(); channel != m_joinedChannels.end(); ++channel )
|
|
|
|
|
{
|
|
|
|
|
if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
}
|
|
|
|
|
for( channel = m_unjoinedChannels.begin(); channel != m_unjoinedChannels.end(); ++channel )
|
|
|
|
|
{
|
|
|
|
|
if (channel.data()->tqcontains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
if (channel.data()->contains(lcNickname)) channellist.append(channel.key());
|
|
|
|
|
}
|
|
|
|
|
return channellist;
|
|
|
|
|
}
|
|
|
|
@ -1610,7 +1610,7 @@ void Server::requestDccSend(const TQString &a_recipient)
|
|
|
|
|
Nick* lookNick=nicks.first();
|
|
|
|
|
while(lookNick)
|
|
|
|
|
{
|
|
|
|
|
if(!nickList.tqcontains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname());
|
|
|
|
|
if(!nickList.contains(lookNick->getChannelNick()->getNickname())) nickList.append(lookNick->getChannelNick()->getNickname());
|
|
|
|
|
lookNick=nicks.next();
|
|
|
|
|
}
|
|
|
|
|
lookChannel=m_channelList.next();
|
|
|
|
@ -1620,7 +1620,7 @@ void Server::requestDccSend(const TQString &a_recipient)
|
|
|
|
|
class Query* lookQuery=m_queryList.first();
|
|
|
|
|
while(lookQuery)
|
|
|
|
|
{
|
|
|
|
|
if(!nickList.tqcontains(lookQuery->getName())) nickList.append(lookQuery->getName());
|
|
|
|
|
if(!nickList.contains(lookQuery->getName())) nickList.append(lookQuery->getName());
|
|
|
|
|
lookQuery=m_queryList.next();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1755,7 +1755,7 @@ void Server::dccResumeGetRequest(const TQString &sender, const TQString &fileNam
|
|
|
|
|
{
|
|
|
|
|
Konversation::OutputFilterResult result;
|
|
|
|
|
|
|
|
|
|
if (fileName.tqcontains(" ") > 0)
|
|
|
|
|
if (fileName.contains(" ") > 0)
|
|
|
|
|
result = getOutputFilter()->resumeRequest(sender,"\""+fileName+"\"",port,startAt);
|
|
|
|
|
else
|
|
|
|
|
result = getOutputFilter()->resumeRequest(sender,fileName,port,startAt);
|
|
|
|
@ -2033,7 +2033,7 @@ void Server::updateChannelMode(const TQString &updater, const TQString &channelN
|
|
|
|
|
// "q" is the likely answer.. UnrealIRCd and euIRCd use it.
|
|
|
|
|
// TODO these need to become dynamic
|
|
|
|
|
TQString userModes="vhoqa"; // voice halfop op owner admin
|
|
|
|
|
int modePos = userModes.tqfind(mode);
|
|
|
|
|
int modePos = userModes.find(mode);
|
|
|
|
|
if (modePos > 0)
|
|
|
|
|
{
|
|
|
|
|
ChannelNickPtr updateeNick = getChannelNick(channelName, parameter);
|
|
|
|
@ -2164,7 +2164,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
|
|
|
|
|
// Move the channel from unjoined list (if present) to joined list.
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
ChannelNickMap *channel;
|
|
|
|
|
if (m_unjoinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_unjoinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = m_unjoinedChannels[lcChannelName];
|
|
|
|
|
m_unjoinedChannels.remove(lcChannelName);
|
|
|
|
@ -2174,7 +2174,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Create a new list in the joined channels if not already present.
|
|
|
|
|
if (!m_joinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (!m_joinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = new ChannelNickMap;
|
|
|
|
|
m_joinedChannels.insert(lcChannelName, channel);
|
|
|
|
@ -2185,7 +2185,7 @@ ChannelNickPtr Server::addNickToJoinedChannelsList(const TQString& channelName,
|
|
|
|
|
}
|
|
|
|
|
// Add NickInfo to channel list if not already in the list.
|
|
|
|
|
ChannelNickPtr channelNick;
|
|
|
|
|
if (!channel->tqcontains(lcNickname))
|
|
|
|
|
if (!channel->contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
channelNick = new ChannelNick(nickInfo, false, false, false, false, false);
|
|
|
|
|
Q_ASSERT(channelNick);
|
|
|
|
@ -2242,7 +2242,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
|
|
|
|
|
// Move the channel from joined list (if present) to unjoined list.
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
ChannelNickMap *channel;
|
|
|
|
|
if (m_joinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_joinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = m_joinedChannels[lcChannelName];
|
|
|
|
|
m_joinedChannels.remove(lcChannelName);
|
|
|
|
@ -2252,7 +2252,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
// Create a new list in the unjoined channels if not already present.
|
|
|
|
|
if (!m_unjoinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (!m_unjoinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = new ChannelNickMap;
|
|
|
|
|
m_unjoinedChannels.insert(lcChannelName, channel);
|
|
|
|
@ -2263,7 +2263,7 @@ ChannelNickPtr Server::addNickToUnjoinedChannelsList(const TQString& channelName
|
|
|
|
|
}
|
|
|
|
|
// Add NickInfo to unjoinedChannels list if not already in the list.
|
|
|
|
|
ChannelNickPtr channelNick;
|
|
|
|
|
if (!channel->tqcontains(lcNickname))
|
|
|
|
|
if (!channel->contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
channelNick = new ChannelNick(nickInfo, false, false, false, false, false);
|
|
|
|
|
channel->insert(lcNickname, channelNick);
|
|
|
|
@ -2331,7 +2331,7 @@ bool Server::setNickOffline(const TQString& nickname)
|
|
|
|
|
if (nickInfo && wasOnline)
|
|
|
|
|
{
|
|
|
|
|
// Delete from query list, if present.
|
|
|
|
|
if (m_queryNicks.tqcontains(lcNickname)) m_queryNicks.remove(lcNickname);
|
|
|
|
|
if (m_queryNicks.contains(lcNickname)) m_queryNicks.remove(lcNickname);
|
|
|
|
|
// Delete the nickname from all channels (joined or unjoined).
|
|
|
|
|
TQStringList nickChannels = getNickChannels(lcNickname);
|
|
|
|
|
TQStringList::iterator itEnd = nickChannels.end();
|
|
|
|
@ -2343,7 +2343,7 @@ bool Server::setNickOffline(const TQString& nickname)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Delete NickInfo.
|
|
|
|
|
if (m_allNicks.tqcontains(lcNickname)) m_allNicks.remove(lcNickname);
|
|
|
|
|
if (m_allNicks.contains(lcNickname)) m_allNicks.remove(lcNickname);
|
|
|
|
|
// If the nick was in the watch list, emit various signals and messages.
|
|
|
|
|
if (isWatchedNick(nickname)) setWatchedNickOffline(nickname, nickInfo);
|
|
|
|
|
|
|
|
|
@ -2366,7 +2366,7 @@ bool Server::deleteNickIfUnlisted(const TQString &nickname)
|
|
|
|
|
// Don't delete our own nickinfo.
|
|
|
|
|
if (lcNickname == loweredNickname()) return false;
|
|
|
|
|
|
|
|
|
|
if (!m_queryNicks.tqcontains(lcNickname))
|
|
|
|
|
if (!m_queryNicks.contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
TQStringList nickChannels = getNickChannels(nickname);
|
|
|
|
|
if (nickChannels.isEmpty())
|
|
|
|
@ -2390,10 +2390,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
TQString lcNickname = nickname.lower();
|
|
|
|
|
ChannelNickMap *channel;
|
|
|
|
|
if (m_joinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_joinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = m_joinedChannels[lcChannelName];
|
|
|
|
|
if (channel->tqcontains(lcNickname))
|
|
|
|
|
if (channel->contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
channel->remove(lcNickname);
|
|
|
|
|
doSignal = true;
|
|
|
|
@ -2404,10 +2404,10 @@ void Server::removeChannelNick(const TQString& channelName, const TQString& nick
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (m_unjoinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_unjoinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
channel = m_unjoinedChannels[lcChannelName];
|
|
|
|
|
if (channel->tqcontains(lcNickname))
|
|
|
|
|
if (channel->contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
channel->remove(lcNickname);
|
|
|
|
|
doSignal = true;
|
|
|
|
@ -2453,7 +2453,7 @@ bool Server::isWatchedNick(const TQString& nickname)
|
|
|
|
|
// Get watch list from preferences.
|
|
|
|
|
TQString watchlist= ' ' + getWatchListString() + ' ';
|
|
|
|
|
// Search case-insensitivly
|
|
|
|
|
return (watchlist.tqfind(' ' + nickname + ' ', 0, 0) != -1);
|
|
|
|
|
return (watchlist.find(' ' + nickname + ' ', 0, 0) != -1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2468,7 +2468,7 @@ void Server::removeJoinedChannel(const TQString& channelName)
|
|
|
|
|
TQStringList watchListLower = getWatchList();
|
|
|
|
|
TQString lcChannelName = channelName.lower();
|
|
|
|
|
// Move the channel nick list from the joined to unjoined lists.
|
|
|
|
|
if (m_joinedChannels.tqcontains(lcChannelName))
|
|
|
|
|
if (m_joinedChannels.contains(lcChannelName))
|
|
|
|
|
{
|
|
|
|
|
doSignal = true;
|
|
|
|
|
ChannelNickMap* channel = m_joinedChannels[lcChannelName];
|
|
|
|
@ -2482,7 +2482,7 @@ void Server::removeJoinedChannel(const TQString& channelName)
|
|
|
|
|
for ( member = channel->begin(); member != channel->end() ;)
|
|
|
|
|
{
|
|
|
|
|
TQString lcNickname = member.key();
|
|
|
|
|
if (watchListLower.tqfind(lcNickname) == watchListLower.end())
|
|
|
|
|
if (watchListLower.find(lcNickname) == watchListLower.end())
|
|
|
|
|
{
|
|
|
|
|
// Remove the unwatched nickname from the unjoined channel.
|
|
|
|
|
channel->remove(member);
|
|
|
|
@ -2536,7 +2536,7 @@ void Server::renameNickInfo(NickInfoPtr nickInfo, const TQString& newname)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Rename key in Query list.
|
|
|
|
|
if (m_queryNicks.tqcontains(lcNickname))
|
|
|
|
|
if (m_queryNicks.contains(lcNickname))
|
|
|
|
|
{
|
|
|
|
|
m_queryNicks.remove(lcNickname);
|
|
|
|
|
m_queryNicks.insert(lcNewname, nickInfo);
|
|
|
|
@ -2826,7 +2826,7 @@ const TQString& /*parameter*/)
|
|
|
|
|
int index = 0, found = 0;
|
|
|
|
|
TQChar toExpand;
|
|
|
|
|
|
|
|
|
|
while ((found = toParse.tqfind('%',index)) != -1)
|
|
|
|
|
while ((found = toParse.find('%',index)) != -1)
|
|
|
|
|
{
|
|
|
|
|
// append part before the %
|
|
|
|
|
out.append(toParse.mid(index,found-index));
|
|
|
|
@ -2836,7 +2836,7 @@ const TQString& /*parameter*/)
|
|
|
|
|
toExpand = toParse.at(index++);
|
|
|
|
|
if (toExpand == 's')
|
|
|
|
|
{
|
|
|
|
|
found = toParse.tqfind('%',index);
|
|
|
|
|
found = toParse.find('%',index);
|
|
|
|
|
if (found == -1) // no other % (not valid)
|
|
|
|
|
break;
|
|
|
|
|
separator = toParse.mid(index,found-index);
|
|
|
|
@ -2917,7 +2917,7 @@ void Server::scriptExecutionError(const TQString& name)
|
|
|
|
|
|
|
|
|
|
bool Server::isAChannel(const TQString &channel) const
|
|
|
|
|
{
|
|
|
|
|
return (getChannelTypes().tqcontains(channel.at(0)) > 0);
|
|
|
|
|
return (getChannelTypes().contains(channel.at(0)) > 0);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Server::addRawLog(bool show)
|
|
|
|
@ -3185,7 +3185,7 @@ void Server::setAway(bool away)
|
|
|
|
|
if (identity && identity->getShowAwayMessage())
|
|
|
|
|
{
|
|
|
|
|
TQString message = identity->getAwayMessage();
|
|
|
|
|
sendToAllChannels(message.tqreplace(TQRegExp("%s", false), m_awayReason));
|
|
|
|
|
sendToAllChannels(message.replace(TQRegExp("%s", false), m_awayReason));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (identity && identity->getInsertRememberLineOnAway())
|
|
|
|
@ -3210,7 +3210,7 @@ void Server::setAway(bool away)
|
|
|
|
|
if (identity && identity->getShowAwayMessage())
|
|
|
|
|
{
|
|
|
|
|
TQString message = identity->getReturnMessage();
|
|
|
|
|
sendToAllChannels(message.tqreplace(TQRegExp("%t", false), awayTime()));
|
|
|
|
|
sendToAllChannels(message.replace(TQRegExp("%t", false), awayTime()));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -3344,5 +3344,5 @@ void Server::updateEncoding()
|
|
|
|
|
|
|
|
|
|
#include "server.moc"
|
|
|
|
|
|
|
|
|
|
// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; tqreplace-tabs on;
|
|
|
|
|
// kate: space-indent on; tab-width 4; indent-width 4; mixed-indent off; replace-tabs on;
|
|
|
|
|
// vim: set et sw=4 ts=4 cino=l1,cs,U1:
|
|
|
|
|