summaryrefslogtreecommitdiffstats
path: root/src/modules/dcc/requests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/dcc/requests.cpp')
-rw-r--r--src/modules/dcc/requests.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/src/modules/dcc/requests.cpp b/src/modules/dcc/requests.cpp
index e1e18143..29e6b424 100644
--- a/src/modules/dcc/requests.cpp
+++ b/src/modules/dcc/requests.cpp
@@ -50,7 +50,7 @@
#include "utils.h"
#include "send.h"
-#include <qfileinfo.h>
+#include <tqfileinfo.h>
#ifdef COMPILE_ON_WINDOWS
// Ugly Windoze compiler...
@@ -62,7 +62,7 @@
extern KVIRC_API KviSharedFilesManager * g_pSharedFilesManager;
extern KviDccBroker * g_pDccBroker;
-static void dcc_module_reply_errmsg(KviDccRequest * dcc,const QString& errText)
+static void dcc_module_reply_errmsg(KviDccRequest * dcc,const TQString& errText)
{
dcc->ctcpMsg->msg->console()->connection()->sendFmtData(
"NOTICE %s :%cERRMSG %s%c",
@@ -71,7 +71,7 @@ static void dcc_module_reply_errmsg(KviDccRequest * dcc,const QString& errText)
,0x01);
}
-static void dcc_module_request_error(KviDccRequest * dcc,const QString& errText)
+static void dcc_module_request_error(KviDccRequest * dcc,const TQString& errText)
{
dcc->ctcpMsg->msg->console()->output(KVI_OUT_DCCERROR,
__tr2qs_ctx("Unable to process the above request: %Q, %Q","dcc"),
@@ -80,7 +80,7 @@ static void dcc_module_request_error(KviDccRequest * dcc,const QString& errText)
if(KVI_OPTION_BOOL(KviOption_boolNotifyFailedDccHandshakes))
{
- QString szError = QString("Sorry, your DCC %1 request can't be satisfied: %2").arg(dcc->szType.ptr()).arg(errText);
+ TQString szError = TQString("Sorry, your DCC %1 request can't be satisfied: %2").tqarg(dcc->szType.ptr()).tqarg(errText);
dcc_module_reply_errmsg(dcc,szError);
}
}
@@ -164,7 +164,7 @@ static bool dcc_module_normalize_target_data(KviDccRequest * dcc,KviStr &ipaddr,
if(ipaddr.isUnsignedNum())
{
addr.s_addr = htonl((unsigned long)ipaddr.toULong());
- QString tmp;
+ TQString tmp;
if(!kvi_binaryIpToStringIp(addr,tmp))
{
if(!dcc->ctcpMsg->msg->haltOutput())
@@ -263,9 +263,9 @@ static void dccModuleParseDccChat(KviDccRequest *dcc)
szExtensions.cutRight(4); // cut off CHAT
#ifdef COMPILE_SSL_SUPPORT
- bool bSSLExtension = szExtensions.contains('S',false);
+ bool bSSLExtension = szExtensions.tqcontains('S',false);
#else //!COMPILE_SSL_SUPPORT
- if(szExtensions.contains('S',false))
+ if(szExtensions.tqcontains('S',false))
{
dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC CHAT is not available","dcc"));
return;
@@ -296,7 +296,7 @@ static void dccModuleParseDccChat(KviDccRequest *dcc)
if(d->szFakeIp.isEmpty())KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault) = false;
}
d->setZeroPortRequestTag(dcc->szParam4.ptr());
- QString tmp;
+ TQString tmp;
if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))d->szListenIp = "0.0.0.0";
else d->szListenIp=tmp;
d->szListenPort = "0"; // any port is OK
@@ -305,7 +305,7 @@ static void dccModuleParseDccChat(KviDccRequest *dcc)
} else {
// zero port acknowledge
// check if this is a tag that we have sent out
- QString szTag = QString(dcc->szParam4.ptr());
+ TQString szTag = TQString(dcc->szParam4.ptr());
KviDccZeroPortTag * t = g_pDccBroker->findZeroPortTag(szTag);
if(!t)
{
@@ -444,7 +444,7 @@ static void dccModuleParseDccSend(KviDccRequest *dcc)
dcc->szParam4 = __tr2qs_ctx("<unknown size>","dcc");
}
- if(dcc->szParam1.contains('/'))
+ if(dcc->szParam1.tqcontains('/'))
{
if(!dcc->ctcpMsg->msg->haltOutput())
{
@@ -457,11 +457,11 @@ static void dccModuleParseDccSend(KviDccRequest *dcc)
KviStr szExtensions = dcc->szType;
szExtensions.cutRight(4); // cut off SEND
- bool bTurboExtension = szExtensions.contains('T',false);
+ bool bTurboExtension = szExtensions.tqcontains('T',false);
#ifdef COMPILE_SSL_SUPPORT
- bool bSSLExtension = szExtensions.contains('S',false);
+ bool bSSLExtension = szExtensions.tqcontains('S',false);
#else //!COMPILE_SSL_SUPPORT
- if(szExtensions.contains('S',false))
+ if(szExtensions.tqcontains('S',false))
{
dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC SEND is not available","dcc"));
return;
@@ -487,9 +487,9 @@ static void dccModuleParseDccSend(KviDccRequest *dcc)
if(d->szFakeIp.isEmpty())KVI_OPTION_BOOL(KviOption_boolDccSendFakeAddressByDefault) = false;
}
d->setZeroPortRequestTag(dcc->szParam5.ptr());
- QString tmp;
+ TQString tmp;
if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))d->szListenIp = "0.0.0.0";
- else d->szListenIp=QString(tmp);
+ else d->szListenIp=TQString(tmp);
d->szListenPort = "0"; // any port is OK
d->bSendRequest = true;
d->szLocalFileSize = d->szFileSize;
@@ -592,7 +592,7 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc)
dcc->szParam4 = "0";
}
- if(dcc->szParam1.contains('/'))
+ if(dcc->szParam1.tqcontains('/'))
{
if(!dcc->ctcpMsg->msg->haltOutput())
{
@@ -605,11 +605,11 @@ static void dccModuleParseDccRecv(KviDccRequest * dcc)
KviStr szExtensions = dcc->szType;
szExtensions.cutRight(4); // cut off RECV
- bool bTurboExtension = szExtensions.contains('T',false);
+ bool bTurboExtension = szExtensions.tqcontains('T',false);
#ifdef COMPILE_SSL_SUPPORT
- bool bSSLExtension = szExtensions.contains('S',false);
+ bool bSSLExtension = szExtensions.tqcontains('S',false);
#else //!COMPILE_SSL_SUPPORT
- if(szExtensions.contains('S',false))
+ if(szExtensions.tqcontains('S',false))
{
dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC RECV is not available","dcc"));
return;
@@ -730,7 +730,7 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc)
dcc->szParam2 = __tr_ctx("<unknown size>","dcc");
}
- if(dcc->szParam1.contains('/'))
+ if(dcc->szParam1.tqcontains('/'))
{
if(!dcc->ctcpMsg->msg->haltOutput())
{
@@ -743,11 +743,11 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc)
KviStr szExtensions = dcc->szType;
szExtensions.cutRight(4); // cut off SEND
- bool bTurboExtension = szExtensions.contains('T',false);
+ bool bTurboExtension = szExtensions.tqcontains('T',false);
#ifdef COMPILE_SSL_SUPPORT
- bool bSSLExtension = szExtensions.contains('S',false);
+ bool bSSLExtension = szExtensions.tqcontains('S',false);
#else //!COMPILE_SSL_SUPPORT
- if(szExtensions.contains('S',false))
+ if(szExtensions.tqcontains('S',false))
{
dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC RSEND is not available","dcc"));
return;
@@ -762,14 +762,14 @@ static void dccModuleParseDccRSend(KviDccRequest *dcc)
d->szHost = dcc->ctcpMsg->pSource->host();
d->szIp = __tr2qs_ctx("(unknown)","dcc");
d->szPort = d->szIp;
- QString tmp;
+ TQString tmp;
if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))
{
d->console()->output(KVI_OUT_DCCMSG,
__tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...","dcc"));
d->szListenIp = "0.0.0.0";
} else
- d->szListenIp=QString(tmp);
+ d->szListenIp=TQString(tmp);
d->szListenPort = "0";
dcc_fill_local_nick_user_host(d,dcc);
@@ -826,11 +826,11 @@ static void dccModuleParseDccGet(KviDccRequest *dcc)
KviStr szExtensions = dcc->szType;
szExtensions.cutRight(3); // cut off GET
- bool bTurboExtension = szExtensions.contains('T',false);
+ bool bTurboExtension = szExtensions.tqcontains('T',false);
#ifdef COMPILE_SSL_SUPPORT
- bool bSSLExtension = szExtensions.contains('S',false);
+ bool bSSLExtension = szExtensions.tqcontains('S',false);
#else //!COMPILE_SSL_SUPPORT
- if(szExtensions.contains('S',false))
+ if(szExtensions.tqcontains('S',false))
{
dcc_module_request_error(dcc,__tr2qs_ctx("This executable has been compiled without SSL support, the SSL extension to DCC GET is not available","dcc"));
return;
@@ -866,7 +866,7 @@ static void dccModuleParseDccGet(KviDccRequest *dcc)
szSubproto.prepend(szExtensions);
- QString szFileName = QFileInfo(o->absFilePath()).fileName();
+ TQString szFileName = TQFileInfo(o->absFilePath()).fileName();
if(o->name() != szFileName)
{
// BUG
@@ -877,8 +877,8 @@ static void dccModuleParseDccGet(KviDccRequest *dcc)
// now add a file offer , so he we will accept it automatically
// 120 secs is a reasonable timeout
- QString szMask;
- dcc->ctcpMsg->pSource->mask(szMask,KviIrcMask::NickUserHost);
+ TQString szMask;
+ dcc->ctcpMsg->pSource->tqmask(szMask,KviIrcMask::NickUserHost);
KviSharedFile * pOld = o;
o = g_pSharedFilesManager->addSharedFile(szFileName,o->absFilePath(),szMask,120);
@@ -911,14 +911,14 @@ static void dccModuleParseDccGet(KviDccRequest *dcc)
d->bRecvFile = false;
dcc_fill_local_nick_user_host(d,dcc);
- QString tmp;
+ TQString tmp;
if(!dcc_kvs_get_listen_ip_address(0,d->console(),tmp))
{
d->console()->output(KVI_OUT_DCCMSG,
__tr2qs_ctx("No suitable interface to listen on, trying to continue anyway...","dcc"));
d->szListenIp = "0.0.0.0";
} else
- d->szListenIp=QString(tmp);
+ d->szListenIp=TQString(tmp);
//#warning "DO STH WITH THIS PORT (HOW TO SPECIFY IT ?)"
d->szListenPort = "0"; // any port is ok
@@ -1081,7 +1081,7 @@ static void dccModuleParseDccCanvas(KviDccRequest *dcc)
static void dccModuleParseDccList(KviDccRequest *dcc)
{
- // DCC LIST <mask> <ipaddr> <port>
+ // DCC LIST <tqmask> <ipaddr> <port>
// FIXME!
}