summaryrefslogtreecommitdiffstats
path: root/src/kvilib/irc/kvi_ircserver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/irc/kvi_ircserver.cpp')
-rw-r--r--src/kvilib/irc/kvi_ircserver.cpp146
1 files changed, 73 insertions, 73 deletions
diff --git a/src/kvilib/irc/kvi_ircserver.cpp b/src/kvilib/irc/kvi_ircserver.cpp
index 5f03fb5e..8e1898fa 100644
--- a/src/kvilib/irc/kvi_ircserver.cpp
+++ b/src/kvilib/irc/kvi_ircserver.cpp
@@ -89,7 +89,7 @@ KviIrcServer::KviIrcServer(const KviIrcServer &serv)
m_iProxy = serv.m_iProxy;
m_szUserIdentityId = serv.m_szUserIdentityId;
if(serv.m_pChannelList)
- m_pChannelList = new QStringList(*(serv.m_pChannelList));
+ m_pChannelList = new TQStringList(*(serv.m_pChannelList));
else m_pChannelList = 0;
m_bAutoConnect = serv.m_bAutoConnect;
}
@@ -115,7 +115,7 @@ void KviIrcServer::operator=(const KviIrcServer &serv)
m_iProxy = serv.m_iProxy;
if(m_pChannelList)delete m_pChannelList;
if(serv.m_pChannelList)
- m_pChannelList = new QStringList(*(serv.m_pChannelList));
+ m_pChannelList = new TQStringList(*(serv.m_pChannelList));
else m_pChannelList = 0;
m_bAutoConnect = serv.m_bAutoConnect;
}
@@ -131,12 +131,12 @@ void KviIrcServer::generateUniqueId()
{
struct timeval tv;
kvi_gettimeofday(&tv,0);
- KviQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000);
+ KviTQString::sprintf(m_szId,"myserver%d%d%d",tv.tv_usec,rand() % 1000,rand() % 1000);
}
-QString KviIrcServer::ircUri()
+TQString KviIrcServer::ircUri()
{
- QString uri("irc");
+ TQString uri("irc");
if(useSSL())uri += "s";
if(isIpV6())uri += "6";
uri += "://";
@@ -145,171 +145,171 @@ QString KviIrcServer::ircUri()
if(m_uPort!=6667)
{
uri += ":";
- QString num;
+ TQString num;
num.setNum(m_uPort);
uri += num;
}
return uri;
}
-void KviIrcServer::setAutoJoinChannelList(QStringList * pNewChannelList)
+void KviIrcServer::setAutoJoinChannelList(TQStringList * pNewChannelList)
{
if(m_pChannelList)delete m_pChannelList;
m_pChannelList = pNewChannelList;
}
-bool KviIrcServer::load(KviConfig * cfg,const QString &prefix)
+bool KviIrcServer::load(KviConfig * cfg,const TQString &prefix)
{
- QString tmp;
- KviQString::sprintf(tmp,"%QHostname",&prefix);
- m_szHostname = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QIp",&prefix);
- m_szIp = cfg->readQStringEntry(tmp);
+ TQString tmp;
+ KviTQString::sprintf(tmp,"%TQHostname",&prefix);
+ m_szHostname = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQIp",&prefix);
+ m_szIp = cfg->readTQStringEntry(tmp);
if(m_szHostname.isEmpty() && m_szIp.isEmpty())return false;
- KviQString::sprintf(tmp,"%QDescription",&prefix);
- m_szDescription = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QUser",&prefix);
- m_szUser = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QPass",&prefix);
- m_szPass = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QNick",&prefix);
- m_szNick = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QRealName",&prefix);
- m_szRealName = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QInitUmode",&prefix);
- m_szInitUMode = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix);
- QStringList l = cfg->readStringListEntry(tmp,QStringList());
- if(l.count() > 0)setAutoJoinChannelList(new QStringList(l));
- KviQString::sprintf(tmp,"%QAutoConnect",&prefix);
+ KviTQString::sprintf(tmp,"%TQDescription",&prefix);
+ m_szDescription = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQUser",&prefix);
+ m_szUser = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQPass",&prefix);
+ m_szPass = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQNick",&prefix);
+ m_szNick = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQRealName",&prefix);
+ m_szRealName = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQInitUmode",&prefix);
+ m_szInitUMode = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix);
+ TQStringList l = cfg->readStringListEntry(tmp,TQStringList());
+ if(l.count() > 0)setAutoJoinChannelList(new TQStringList(l));
+ KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix);
m_bAutoConnect = cfg->readBoolEntry(tmp,false);
- KviQString::sprintf(tmp,"%QEncoding",&prefix);
- m_szEncoding = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix);
- m_szOnConnectCommand = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix);
- m_szOnLoginCommand = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QLinkFilter",&prefix);
- m_szLinkFilter = cfg->readQStringEntry(tmp);
- KviQString::sprintf(tmp,"%QPort",&prefix);
+ KviTQString::sprintf(tmp,"%TQEncoding",&prefix);
+ m_szEncoding = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix);
+ m_szOnConnectCommand = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix);
+ m_szOnLoginCommand = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix);
+ m_szLinkFilter = cfg->readTQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQPort",&prefix);
m_uPort = cfg->readUIntEntry(tmp,6667);
- KviQString::sprintf(tmp,"%QId",&prefix);
- m_szId = cfg->readQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQId",&prefix);
+ m_szId = cfg->readTQStringEntry(tmp);
if(m_szId.isEmpty())generateUniqueId();
- KviQString::sprintf(tmp,"%QIpV6",&prefix);
+ KviTQString::sprintf(tmp,"%TQIpV6",&prefix);
setIpV6(cfg->readBoolEntry(tmp,false));
- KviQString::sprintf(tmp,"%QCacheIp",&prefix);
+ KviTQString::sprintf(tmp,"%TQCacheIp",&prefix);
setCacheIp(cfg->readBoolEntry(tmp,false)); // true ?
- KviQString::sprintf(tmp,"%QSSL",&prefix);
+ KviTQString::sprintf(tmp,"%TQSSL",&prefix);
setUseSSL(cfg->readBoolEntry(tmp,false));
- KviQString::sprintf(tmp,"%QProxy",&prefix);
+ KviTQString::sprintf(tmp,"%TQProxy",&prefix);
setProxy(cfg->readIntEntry(tmp,-2));
- KviQString::sprintf(tmp,"%QUserIdentityId",&prefix);
- m_szUserIdentityId = cfg->readQStringEntry(tmp);
+ KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix);
+ m_szUserIdentityId = cfg->readTQStringEntry(tmp);
return true;
}
-void KviIrcServer::save(KviConfig * cfg,const QString &prefix)
+void KviIrcServer::save(KviConfig * cfg,const TQString &prefix)
{
- QString tmp;
- KviQString::sprintf(tmp,"%QHostname",&prefix);
+ TQString tmp;
+ KviTQString::sprintf(tmp,"%TQHostname",&prefix);
cfg->writeEntry(tmp,m_szHostname);
- KviQString::sprintf(tmp,"%QId",&prefix);
+ KviTQString::sprintf(tmp,"%TQId",&prefix);
cfg->writeEntry(tmp,m_szId);
if(!m_szIp.isEmpty())
{
- KviQString::sprintf(tmp,"%QIp",&prefix);
+ KviTQString::sprintf(tmp,"%TQIp",&prefix);
cfg->writeEntry(tmp,m_szIp);
}
if(!m_szDescription.isEmpty())
{
- KviQString::sprintf(tmp,"%QDescription",&prefix);
+ KviTQString::sprintf(tmp,"%TQDescription",&prefix);
cfg->writeEntry(tmp,m_szDescription);
}
if(!m_szUser.isEmpty())
{
- KviQString::sprintf(tmp,"%QUser",&prefix);
+ KviTQString::sprintf(tmp,"%TQUser",&prefix);
cfg->writeEntry(tmp,m_szUser);
}
if(!m_szPass.isEmpty())
{
- KviQString::sprintf(tmp,"%QPass",&prefix);
+ KviTQString::sprintf(tmp,"%TQPass",&prefix);
cfg->writeEntry(tmp,m_szPass);
}
if(!m_szNick.isEmpty())
{
- KviQString::sprintf(tmp,"%QNick",&prefix);
+ KviTQString::sprintf(tmp,"%TQNick",&prefix);
cfg->writeEntry(tmp,m_szNick);
}
if(!m_szRealName.isEmpty())
{
- KviQString::sprintf(tmp,"%QRealName",&prefix);
+ KviTQString::sprintf(tmp,"%TQRealName",&prefix);
cfg->writeEntry(tmp,m_szRealName);
}
if(!m_szInitUMode.isEmpty())
{
- KviQString::sprintf(tmp,"%QInitUMode",&prefix);
+ KviTQString::sprintf(tmp,"%TQInitUMode",&prefix);
cfg->writeEntry(tmp,m_szInitUMode);
}
if(autoJoinChannelList())
{
- KviQString::sprintf(tmp,"%QAutoJoinChannels",&prefix);
+ KviTQString::sprintf(tmp,"%TQAutoJoinChannels",&prefix);
cfg->writeEntry(tmp,*(autoJoinChannelList()));
}
if(autoConnect()) // otherwise it defaults to false anyway
{
- KviQString::sprintf(tmp,"%QAutoConnect",&prefix);
+ KviTQString::sprintf(tmp,"%TQAutoConnect",&prefix);
cfg->writeEntry(tmp,autoConnect());
}
if(!m_szEncoding.isEmpty())
{
- KviQString::sprintf(tmp,"%QEncoding",&prefix);
+ KviTQString::sprintf(tmp,"%TQEncoding",&prefix);
cfg->writeEntry(tmp,m_szEncoding);
}
if(!m_szOnConnectCommand.isEmpty())
{
- KviQString::sprintf(tmp,"%QOnConnectCommand",&prefix);
+ KviTQString::sprintf(tmp,"%TQOnConnectCommand",&prefix);
cfg->writeEntry(tmp,m_szOnConnectCommand);
}
if(!m_szOnLoginCommand.isEmpty())
{
- KviQString::sprintf(tmp,"%QOnLoginCommand",&prefix);
+ KviTQString::sprintf(tmp,"%TQOnLoginCommand",&prefix);
cfg->writeEntry(tmp,m_szOnLoginCommand);
}
if(!m_szLinkFilter.isEmpty())
{
- KviQString::sprintf(tmp,"%QLinkFilter",&prefix);
+ KviTQString::sprintf(tmp,"%TQLinkFilter",&prefix);
cfg->writeEntry(tmp,m_szLinkFilter);
}
if(m_uPort != 6667)
{
- KviQString::sprintf(tmp,"%QPort",&prefix);
+ KviTQString::sprintf(tmp,"%TQPort",&prefix);
cfg->writeEntry(tmp,m_uPort);
}
if(isIpV6())
{
- KviQString::sprintf(tmp,"%QIpV6",&prefix);
+ KviTQString::sprintf(tmp,"%TQIpV6",&prefix);
cfg->writeEntry(tmp,isIpV6());
}
if(cacheIp())
{
- KviQString::sprintf(tmp,"%QCacheIp",&prefix);
+ KviTQString::sprintf(tmp,"%TQCacheIp",&prefix);
cfg->writeEntry(tmp,cacheIp());
}
if(useSSL())
{
- KviQString::sprintf(tmp,"%QSSL",&prefix);
+ KviTQString::sprintf(tmp,"%TQSSL",&prefix);
cfg->writeEntry(tmp,useSSL());
}
if(proxy()!=-2)
{
- KviQString::sprintf(tmp,"%QProxy",&prefix);
+ KviTQString::sprintf(tmp,"%TQProxy",&prefix);
cfg->writeEntry(tmp,proxy());
}
if(!m_szUserIdentityId.isEmpty())
{
- KviQString::sprintf(tmp,"%QUserIdentityId",&prefix);
+ KviTQString::sprintf(tmp,"%TQUserIdentityId",&prefix);
cfg->writeEntry(tmp,m_szUserIdentityId);
}
}
@@ -323,13 +323,13 @@ KviIrcNetwork::KviIrcNetwork(const KviIrcNetwork &src)
copyFrom(src);
}
-KviIrcNetwork::KviIrcNetwork(const QString &name)
+KviIrcNetwork::KviIrcNetwork(const TQString &name)
{
m_szName = name;
m_pChannelList = 0;
m_pNickServRuleSet = 0;
m_bAutoConnect = false;
- // m_szEncoding = QString::null; // set by default
+ // m_szEncoding = TQString(); // set by default
}
KviIrcNetwork::~KviIrcNetwork()
@@ -338,7 +338,7 @@ KviIrcNetwork::~KviIrcNetwork()
if(m_pNickServRuleSet)delete m_pNickServRuleSet;
}
-void KviIrcNetwork::setAutoJoinChannelList(QStringList * pNewChannelList)
+void KviIrcNetwork::setAutoJoinChannelList(TQStringList * pNewChannelList)
{
if(m_pChannelList)delete m_pChannelList;
m_pChannelList = pNewChannelList;
@@ -364,7 +364,7 @@ void KviIrcNetwork::copyFrom(const KviIrcNetwork &src)
m_szOnConnectCommand = src.m_szOnConnectCommand;
m_szOnLoginCommand = src.m_szOnLoginCommand;
if(m_pChannelList)delete m_pChannelList;
- if(src.m_pChannelList)m_pChannelList = new QStringList(*(src.m_pChannelList));
+ if(src.m_pChannelList)m_pChannelList = new TQStringList(*(src.m_pChannelList));
else m_pChannelList = 0;
if(m_pNickServRuleSet)delete m_pNickServRuleSet;
if(src.m_pNickServRuleSet)m_pNickServRuleSet = new KviNickServRuleSet(*(src.m_pNickServRuleSet));