summaryrefslogtreecommitdiffstats
path: root/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp')
-rw-r--r--src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp154
1 files changed, 77 insertions, 77 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
index c3911a3..cf86ed6 100644
--- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
+++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
@@ -48,7 +48,7 @@
#include <unistd.h> // for usleep();
#ifdef COMPILE_USE_QT4
- #include <qx11info_x11.h>
+ #include <tqx11info_x11.h>
#define get_xdisplay QX11Info::display
#else
#define get_xdisplay qt_xdisplay
@@ -113,16 +113,16 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(away)
{
- QString szReason;
+ TQString szReason;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("reason",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szReason)
KVSCSC_PARAMETERS_END
- KVSCSC_REQUIRE_CONNECTION
+ KVSCSC_RETQUIRE_CONNECTION
if(szReason.isEmpty())szReason = KVI_OPTION_STRING(KviOption_stringAwayMessage);
- if(KVSCSC_pSwitches->find('a',"all-networks"))
+ if(KVSCSC_pSwitches->tqfind('a',"all-networks"))
{
KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict);
while(KviWindow * wnd = it.current())
@@ -138,7 +138,7 @@ namespace KviKvsCoreSimpleCommands
++it;
}
} else {
- KviQCString szR = KVSCSC_pConnection->encodeText(szReason);
+ KviTQCString szR = KVSCSC_pConnection->encodeText(szReason);
if(!(KVSCSC_pConnection->sendFmtData("AWAY :%s",szR.data())))
return KVSCSC_pContext->warningNoIrcConnection();
}
@@ -176,7 +176,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(back)
{
- if(KVSCSC_pSwitches->find('a',"all-networks"))
+ if(KVSCSC_pSwitches->tqfind('a',"all-networks"))
{
KviPointerHashTableIterator<const char *,KviWindow> it(*g_pGlobalWindowDict);
while(KviWindow * wnd = it.current())
@@ -190,7 +190,7 @@ namespace KviKvsCoreSimpleCommands
++it;
}
} else {
- KVSCSC_REQUIRE_CONNECTION
+ KVSCSC_RETQUIRE_CONNECTION
if(!(KVSCSC_pConnection->sendFmtData("AWAY")))
return KVSCSC_pContext->warningNoIrcConnection();
@@ -208,11 +208,11 @@ namespace KviKvsCoreSimpleCommands
@title:
ban
@syntax:
- ban <mask_list>
+ ban <tqmask_list>
@short:
- Sets ban masks for the channel
+ Sets ban tqmasks for the channel
@description:
- Sets the ban masks specified in the <mask_list>,
+ Sets the ban tqmasks specified in the <tqmask_list>,
which is a comma separated list of nicknames.
This command works only if executed in a channel window.
The command is translated to a set of MODE messages containing
@@ -291,10 +291,10 @@ namespace KviKvsCoreSimpleCommands
kvs_int_t pitch = -1;
kvs_int_t duration = -1;
- bool bSync = (KVSCSC_pSwitches->find('s',"sync") != 0);
+ bool bSync = (KVSCSC_pSwitches->tqfind('s',"sync") != 0);
bool bOk = false;
- KviKvsVariant * pPitch = KVSCSC_pSwitches->find('p',"pitch");
+ KviKvsVariant * pPitch = KVSCSC_pSwitches->tqfind('p',"pitch");
if(pPitch)
{
if(!pPitch->asInteger(pitch))
@@ -304,7 +304,7 @@ namespace KviKvsCoreSimpleCommands
}
}
- KviKvsVariant * pDuration = KVSCSC_pSwitches->find('d',"duration");
+ KviKvsVariant * pDuration = KVSCSC_pSwitches->tqfind('d',"duration");
if(pDuration)
{
if(!pDuration->asInteger(duration))
@@ -328,19 +328,19 @@ namespace KviKvsCoreSimpleCommands
XGetKeyboardControl(get_xdisplay(),&st);
- unsigned long mask = KBBellPercent;
+ unsigned long tqmask = KBBellPercent;
ctl.bell_percent = uVolume;
if(pitch >= 0)
{
ctl.bell_pitch = pitch;
- mask |= KBBellPitch;
+ tqmask |= KBBellPitch;
}
if(duration >= 0)
{
ctl.bell_duration = duration;
- mask |= KBBellDuration;
+ tqmask |= KBBellDuration;
}
- XChangeKeyboardControl(get_xdisplay(),mask,&ctl);
+ XChangeKeyboardControl(get_xdisplay(),tqmask,&ctl);
XBell(get_xdisplay(),100);
@@ -354,7 +354,7 @@ namespace KviKvsCoreSimpleCommands
ctl.bell_duration = st.bell_duration;
ctl.bell_percent = st.bell_percent;
- XChangeKeyboardControl(get_xdisplay(),mask,&ctl);
+ XChangeKeyboardControl(get_xdisplay(),tqmask,&ctl);
#endif //COMPILE_NO_X_BELL
#endif
@@ -398,7 +398,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(buttonctl)
{
- QString tbTypeUnused,tbName,tbOp,tbPar;
+ TQString tbTypeUnused,tbName,tbOp,tbPar;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("type",KVS_PT_STRING,0,tbTypeUnused)
KVSCSC_PARAMETER("name",KVS_PT_STRING,0,tbName)
@@ -410,7 +410,7 @@ namespace KviKvsCoreSimpleCommands
if(!KVSCSC_pWindow->buttonContainer())
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers"));
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("The specified window has no button containers"));
return true;
}
@@ -418,16 +418,16 @@ namespace KviKvsCoreSimpleCommands
if(!pButton)
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName);
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("No button with type %Q named %Q"),&tbTypeUnused,&tbName);
return true;
}
- QChar o;
+ TQChar o;
if (tbOp.length() > 0) o=tbOp[0];
- else o=QChar('x');
+ else o=TQChar('x');
- // QChar o = tbOp.length() > 0 ? tbOp[0] : QChar('x');
+ // TQChar o = tbOp.length() > 0 ? tbOp[0] : TQChar('x');
- switch(o.unicode())
+ switch(o.tqunicode())
{
case 't':
KviTalToolTip::remove(pButton);
@@ -437,12 +437,12 @@ namespace KviKvsCoreSimpleCommands
case 'i':
if(!tbPar.isEmpty())
{
- QPixmap * pix = g_pIconManager->getImage(tbPar);
+ TQPixmap * pix = g_pIconManager->getImage(tbPar);
if(pix)
{
pButton->setButtonPixmap(*pix);
} else {
- if(!KVSCSC_pSwitches->find('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar);
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))KVSCSC_pContext->warning(__tr2qs("Can't find the icon '%Q'"),&tbPar);
}
}
break;
@@ -508,26 +508,26 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(ctcp)
{
- QString szTarget,szCtcpData;
+ TQString szTarget,szCtcpData;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("target",KVS_PT_NONEMPTYSTRING,0,szTarget)
KVSCSC_PARAMETER("ctcp_data",KVS_PT_STRING,KVS_PF_OPTIONAL | KVS_PF_APPENDREMAINING,szCtcpData)
KVSCSC_PARAMETERS_END
- KVSCSC_REQUIRE_CONNECTION
+ KVSCSC_RETQUIRE_CONNECTION
- if(KviQString::equalCI(szCtcpData,"PING"))
+ if(KviTQString::equalCI(szCtcpData,"PING"))
{
struct timeval tv;
kvi_gettimeofday(&tv,0);
- KviQString::appendFormatted(szCtcpData," %d.%d",tv.tv_sec,tv.tv_usec);
+ KviTQString::appendFormatted(szCtcpData," %d.%d",tv.tv_sec,tv.tv_usec);
}
- KviQCString szT = KVSCSC_pConnection->encodeText(szTarget);
- KviQCString szD = KVSCSC_pConnection->encodeText(szCtcpData);
+ KviTQCString szT = KVSCSC_pConnection->encodeText(szTarget);
+ KviTQCString szD = KVSCSC_pConnection->encodeText(szCtcpData);
if(!(KVSCSC_pConnection->sendFmtData("%s %s :%c%s%c",
- KVSCSC_pSwitches->find('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01)))
+ KVSCSC_pSwitches->tqfind('n',"notice") ? "NOTICE" : "PRIVMSG",szT.data(),0x01,szD.data(),0x01)))
return KVSCSC_pContext->warningNoIrcConnection();
return true;
@@ -553,7 +553,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(debug)
{
- QString szAll;
+ TQString szAll;
KVSCSC_pParams->allAsString(szAll);
KviWindow * pWnd = KviDebugWindow::getInstance();
pWnd->outputNoFmt(KVI_OUT_NONE,szAll);
@@ -628,16 +628,16 @@ namespace KviKvsCoreSimpleCommands
KVSCSC_PARAMETERS_END
if(hObject == (kvs_hobject_t)0)
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Can't delete a null object reference"));
} else {
KviKvsObject * o = KviKvsKernel::instance()->objectController()->lookupObject(hObject);
if(!o)
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Can't delete an inexisting object"));
} else {
- if(KVSCSC_pSwitches->find('i',"immediate"))
+ if(KVSCSC_pSwitches->tqfind('i',"immediate"))
o->dieNow();
else
o->die();
@@ -679,7 +679,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(delpopupitem)
{
- QString szPopupName,szItemId;
+ TQString szPopupName,szItemId;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("popupname",KVS_PT_NONEMPTYSTRING,0,szPopupName)
KVSCSC_PARAMETER("item_id",KVS_PT_NONEMPTYSTRING,0,szItemId)
@@ -688,7 +688,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsPopupMenu * p = KviKvsPopupManager::instance()->lookup(szPopupName);
if(!p)
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("Inexisting popup \"%Q\""),&szPopupName);
return true;
}
@@ -699,9 +699,9 @@ namespace KviKvsCoreSimpleCommands
return false;
}
- if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->find('d',"deep")))
+ if(!p->removeItemByName(szItemId,KVSCSC_pSwitches->tqfind('d',"deep")))
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("The menu item with id \"%Q\" does not exist in popup \"%Q\""),&szItemId,&szPopupName);
}
@@ -840,7 +840,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(echo)
{
- QString szAll;
+ TQString szAll;
KVSCSC_pParams->allAsString(szAll);
kvs_int_t iMsgType = KVI_OUT_NONE;
@@ -849,11 +849,11 @@ namespace KviKvsCoreSimpleCommands
if(!KVSCSC_pSwitches->isEmpty())
{
KviKvsVariant * v;
- if((v = KVSCSC_pSwitches->find('w',"window")))
+ if((v = KVSCSC_pSwitches->tqfind('w',"window")))
{
- QString szWnd;
+ TQString szWnd;
v->asString(szWnd);
- //#warning "FIXME: the window database is not unicode! (we even could keep integer window id's at this point!)"
+ //#warning "FIXME: the window database is not tqunicode! (we even could keep integer window id's at this point!)"
pWnd = g_pApp->findWindow(szWnd.utf8().data());
if(!pWnd)
{
@@ -862,7 +862,7 @@ namespace KviKvsCoreSimpleCommands
}
}
- if((v = KVSCSC_pSwitches->find('i',"icon")))
+ if((v = KVSCSC_pSwitches->tqfind('i',"icon")))
{
if(!v->asInteger(iMsgType))
{
@@ -873,13 +873,13 @@ namespace KviKvsCoreSimpleCommands
}
}
- if(KVSCSC_pSwitches->find('d',"debug"))
+ if(KVSCSC_pSwitches->tqfind('d',"debug"))
{
pWnd = KviDebugWindow::getInstance();
}
}
- int iFlags = KVSCSC_pSwitches->find('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0;
+ int iFlags = KVSCSC_pSwitches->tqfind('n',"no-timestamp") ? KviIrcView::NoTimestamp : 0;
pWnd->outputNoFmt(iMsgType,szAll,iFlags);
return true;
}
@@ -956,7 +956,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(echoprivmsg)
{
- QString szNick,szUser,szHost,szText;
+ TQString szNick,szUser,szHost,szText;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("nick",KVS_PT_NONEMPTYSTRING,0,szNick)
KVSCSC_PARAMETER("user",KVS_PT_STRING,0,szUser)
@@ -971,7 +971,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsVariant * v;
- if(v = KVSCSC_pSwitches->find('i',"color-set"))
+ if(v = KVSCSC_pSwitches->tqfind('i',"color-set"))
{
kvs_int_t msgType;
if(v->asInteger(msgType))
@@ -981,9 +981,9 @@ namespace KviKvsCoreSimpleCommands
} else KVSCSC_pContext->warning(__tr2qs("Invalid color-set specification, using default"));
}
- if(v = KVSCSC_pSwitches->find('w',"window"))
+ if(v = KVSCSC_pSwitches->tqfind('w',"window"))
{
- QString szWin;
+ TQString szWin;
v->asString(szWin);
KviStr window = szWin;
pWnd = g_pApp->findWindow(window.ptr());
@@ -994,30 +994,30 @@ namespace KviKvsCoreSimpleCommands
}
}
- QString szPrefix,szSuffix;
+ TQString szPrefix,szSuffix;
bool bPrefix = false;
bool bSuffix = false;
- if(v = KVSCSC_pSwitches->find('p',"prefix"))
+ if(v = KVSCSC_pSwitches->tqfind('p',"prefix"))
{
v->asString(szPrefix);
bPrefix = true;
}
- if(v = KVSCSC_pSwitches->find('s',"suffix"))
+ if(v = KVSCSC_pSwitches->tqfind('s',"suffix"))
{
v->asString(szSuffix);
bSuffix = true;
}
int iFlags = 0;
- if(KVSCSC_pSwitches->find('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting;
- if(KVSCSC_pSwitches->find('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing;
- if(KVSCSC_pSwitches->find('x',"no-notifier"))iFlags |= KviConsole::NoNotifier;
+ if(KVSCSC_pSwitches->tqfind('n',"no-highlighting"))iFlags |= KviConsole::NoHighlighting;
+ if(KVSCSC_pSwitches->tqfind('f',"no-flashing"))iFlags |= KviConsole::NoWindowFlashing;
+ if(KVSCSC_pSwitches->tqfind('x',"no-notifier"))iFlags |= KviConsole::NoNotifier;
pConsole->outputPrivmsg(pWnd,type,
szNick,szUser,szHost,szText,
iFlags,
- bPrefix ? szPrefix : QString::null,bSuffix ? szSuffix : QString::null);
+ bPrefix ? szPrefix : TQString(),bSuffix ? szSuffix : TQString());
return true;
}
@@ -1044,7 +1044,7 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(error)
{
#ifdef COMPILE_NEW_KVS
- QString szAll;
+ TQString szAll;
KVSCSC_pParams->allAsString(szAll);
KVSCSC_pContext->error("%Q",&szAll);
#endif
@@ -1114,19 +1114,19 @@ namespace KviKvsCoreSimpleCommands
KVSCSC(eval)
{
- QString szCommands;
+ TQString szCommands;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("commands",KVS_PT_STRING,KVS_PF_APPENDREMAINING,szCommands)
KVSCSC_PARAMETERS_END
KviKvsScript s("eval::inner",szCommands);
int iRunFlags = 0;
- if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->find('q',"quiet"))
+ if(KVSCSC_pContext->reportingDisabled() || KVSCSC_pSwitches->tqfind('q',"quiet"))
iRunFlags |= KviKvsScript::Quiet;
bool bRet = s.run(KVSCSC_pContext,iRunFlags) ? true : false;
if(!bRet)
{
- if(!KVSCSC_pSwitches->find('f',"force"))
+ if(!KVSCSC_pSwitches->tqfind('f',"force"))
return false;
KVSCSC_pContext->clearError();
}
@@ -1169,7 +1169,7 @@ namespace KviKvsCoreSimpleCommands
*/
KVSCSC(eventctl)
{
- QString szEventName,szHandlerName;
+ TQString szEventName,szHandlerName;
KviKvsVariantList vList;
KVSCSC_PARAMETERS_BEGIN
KVSCSC_PARAMETER("event_name",KVS_PT_NONEMPTYSTRING,0,szEventName)
@@ -1185,7 +1185,7 @@ namespace KviKvsCoreSimpleCommands
{
if(!KviKvsEventManager::instance()->isValidRawEvent(iNumber))
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
@@ -1193,42 +1193,42 @@ namespace KviKvsCoreSimpleCommands
iNumber = KviKvsEventManager::instance()->findAppEventIndexByName(szEventName);
if(!KviKvsEventManager::instance()->isValidAppEvent(iNumber))
{
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No such event (%Q)"),&szEventName);
return true;
}
}
- if(KVSCSC_pSwitches->find('u',"unregister"))
+ if(KVSCSC_pSwitches->tqfind('u',"unregister"))
{
// unregister it
if(bIsRaw)
{
if(!KviKvsEventManager::instance()->removeScriptRawHandler(iNumber,szHandlerName))
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber);
} else {
if(!KviKvsEventManager::instance()->removeScriptAppHandler(iNumber,szHandlerName))
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
- } else if(KVSCSC_pSwitches->find('e',"enable") || KVSCSC_pSwitches->find('d',"disable"))
+ } else if(KVSCSC_pSwitches->tqfind('e',"enable") || KVSCSC_pSwitches->tqfind('d',"disable"))
{
// enable it
if(bIsRaw)
{
- if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable")))
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KviKvsEventManager::instance()->enableScriptRawHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable")))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for raw numeric event '%d'"),&szHandlerName,iNumber);
} else {
- if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->find('e',"enable")))
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KviKvsEventManager::instance()->enableScriptAppHandler(iNumber,szHandlerName,KVSCSC_pSwitches->tqfind('e',"enable")))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
} else {
// trigger it
KviKvsScriptEventHandler * h;
- QString code;
+ TQString code;
if(bIsRaw)
{
@@ -1244,7 +1244,7 @@ namespace KviKvsCoreSimpleCommands
KviKvsVariant retVal;
copy.run(KVSCSC_pWindow,&vList,0,KviKvsScript::PreserveParams);
} else {
- if(!KVSCSC_pSwitches->find('q',"quiet"))
+ if(!KVSCSC_pSwitches->tqfind('q',"quiet"))
KVSCSC_pContext->warning(__tr2qs("No handler '%Q' for event '%Q'"),&szHandlerName,&szEventName);
}
}