summaryrefslogtreecommitdiffstats
path: root/src/modules/mask
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-28 18:31:12 +0000
commit0a80cfd57d271dd44221467efb426675fa470356 (patch)
tree6f503a31aa078eaf8fa015cf1749808529d49fc9 /src/modules/mask
parent3329e5a804e28ef3f5eb51d1e7affdd5a508e8f2 (diff)
downloadkvirc-0a80cfd57d271dd44221467efb426675fa470356.tar.gz
kvirc-0a80cfd57d271dd44221467efb426675fa470356.zip
TQt4 port kvirc
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kvirc@1238719 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/modules/mask')
-rw-r--r--src/modules/mask/libkvimask.cpp118
1 files changed, 59 insertions, 59 deletions
diff --git a/src/modules/mask/libkvimask.cpp b/src/modules/mask/libkvimask.cpp
index 3f8be4b2..0e810c34 100644
--- a/src/modules/mask/libkvimask.cpp
+++ b/src/modules/mask/libkvimask.cpp
@@ -28,140 +28,140 @@
#include "kvi_ircmask.h"
/*
- @doc: mask.match
+ @doc: tqmask.match
@type:
function
@title:
- $mask.match
+ $tqmask.match
@short:
- Matches a mask agains a wildcarded one
+ Matches a tqmask agains a wildcarded one
@syntax:
- <boolean> $mask.match(<wildcard_mask:string>,<fixed_mask:string>)
+ <boolean> $tqmask.match(<wildcard_tqmask:string>,<fixed_tqmask:string>)
@description:
- Returns 1 if the <wildcard_mask> matches <fixed_mask> and 0 otherwise.
- <wildcard_mask> can obviously contain wildcards ('*' and '?').
+ Returns 1 if the <wildcard_tqmask> matches <fixed_tqmask> and 0 otherwise.
+ <wildcard_tqmask> can obviously contain wildcards ('*' and '?').
@example:
[example]
- [cmd]if[/cmd]($mask.match(*!*@*.linux.it,$0))
- [cmd]op[/cmd] [fnc]$mask.nick[/fnc]($0)
+ [cmd]if[/cmd]($tqmask.match(*!*@*.linux.it,$0))
+ [cmd]op[/cmd] [fnc]$tqmask.nick[/fnc]($0)
[/example]
*/
-static bool mask_kvs_fnc_match(KviKvsModuleFunctionCall * c)
+static bool tqmask_kvs_fnc_match(KviKvsModuleFunctionCall * c)
{
- QString wildmask,fixedmask;
+ TQString wildtqmask,fixedtqmask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("wildcard mask",KVS_PT_STRING,0,wildmask)
- KVSM_PARAMETER("fixed mask",KVS_PT_STRING,0,fixedmask)
+ KVSM_PARAMETER("wildcard tqmask",KVS_PT_STRING,0,wildtqmask)
+ KVSM_PARAMETER("fixed tqmask",KVS_PT_STRING,0,fixedtqmask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mk1(wildmask);
- KviIrcMask mk2(fixedmask);
+ KviIrcMask mk1(wildtqmask);
+ KviIrcMask mk2(fixedtqmask);
c->returnValue()->setBoolean(mk1.matchesFixed(mk2.nick(),mk2.user(),mk2.host()));
return true;
}
/*
- @doc: mask.nick
+ @doc: tqmask.nick
@type:
function
@title:
- $mask.nick
+ $tqmask.nick
@short:
- Returns the nick part of an IRC mask
+ Returns the nick part of an IRC tqmask
@syntax:
- <string> $mask.nick(<mask:string>)
+ <string> $tqmask.nick(<tqmask:string>)
@description:
- Returns the nickname part of an IRC mask.
+ Returns the nickname part of an IRC tqmask.
*/
-static bool mask_kvs_fnc_nick(KviKvsModuleFunctionCall * c)
+static bool tqmask_kvs_fnc_nick(KviKvsModuleFunctionCall * c)
{
- QString mask;
+ TQString tqmask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mk(mask);
+ KviIrcMask mk(tqmask);
c->returnValue()->setString(mk.nick());
return true;
}
/*
- @doc: mask.user
+ @doc: tqmask.user
@type:
function
@title:
- $mask.user
+ $tqmask.user
@short:
- Returns the username part of an IRC mask
+ Returns the username part of an IRC tqmask
@syntax:
- <string> $mask.user(<mask:string>)
+ <string> $tqmask.user(<tqmask:string>)
@description:
- Returns the username part of an IRC mask.
+ Returns the username part of an IRC tqmask.
*/
-static bool mask_kvs_fnc_user(KviKvsModuleFunctionCall * c)
+static bool tqmask_kvs_fnc_user(KviKvsModuleFunctionCall * c)
{
- QString mask;
+ TQString tqmask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mk(mask);
+ KviIrcMask mk(tqmask);
c->returnValue()->setString(mk.user());
return true;
}
/*
- @doc: mask.host
+ @doc: tqmask.host
@type:
function
@title:
- $mask.host
+ $tqmask.host
@short:
- Returns the hostname part of an IRC mask
+ Returns the hostname part of an IRC tqmask
@syntax:
- <string> $mask.host(<mask:string>)
+ <string> $tqmask.host(<tqmask:string>)
@description:
- Returns the hostname part of an IRC mask.
+ Returns the hostname part of an IRC tqmask.
*/
-static bool mask_kvs_fnc_host(KviKvsModuleFunctionCall * c)
+static bool tqmask_kvs_fnc_host(KviKvsModuleFunctionCall * c)
{
- QString mask;
+ TQString tqmask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mk(mask);
+ KviIrcMask mk(tqmask);
c->returnValue()->setString(mk.host());
return true;
}
/*
- @doc: mask.hasnumerichost
+ @doc: tqmask.hasnumerichost
@type:
function
@title:
- $mask.hasNumericHost
+ $tqmask.hasNumericHost
@short:
- Checks if a host part of a mask is numeric
+ Checks if a host part of a tqmask is numeric
@syntax:
- <boolean> $mask.hasNumericHost(<mask: string>)
+ <boolean> $tqmask.hasNumericHost(<tqmask: string>)
@description:
- Returns 1 if the hostname part of the mask is numeric (e.g : unresolved IPV4 or IPV6 address)
+ Returns 1 if the hostname part of the tqmask is numeric (e.g : unresolved IPV4 or IPV6 address)
*/
-static bool mask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c)
+static bool tqmask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c)
{
- QString mask;
+ TQString tqmask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,mask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,tqmask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mk(mask);
+ KviIrcMask mk(tqmask);
c->returnValue()->setBoolean(mk.hasNumericHost());
return true;
}
@@ -173,18 +173,18 @@ static bool mask_kvs_fnc_hasnumerichost(KviKvsModuleFunctionCall * c)
-static bool mask_module_init(KviModule * m)
+static bool tqmask_module_init(KviModule * m)
{
- KVSM_REGISTER_FUNCTION(m,"match",mask_kvs_fnc_match);
- KVSM_REGISTER_FUNCTION(m,"nick",mask_kvs_fnc_nick);
- KVSM_REGISTER_FUNCTION(m,"user",mask_kvs_fnc_user);
- KVSM_REGISTER_FUNCTION(m,"host",mask_kvs_fnc_host);
- KVSM_REGISTER_FUNCTION(m,"hasnumerichost",mask_kvs_fnc_hasnumerichost);
+ KVSM_REGISTER_FUNCTION(m,"match",tqmask_kvs_fnc_match);
+ KVSM_REGISTER_FUNCTION(m,"nick",tqmask_kvs_fnc_nick);
+ KVSM_REGISTER_FUNCTION(m,"user",tqmask_kvs_fnc_user);
+ KVSM_REGISTER_FUNCTION(m,"host",tqmask_kvs_fnc_host);
+ KVSM_REGISTER_FUNCTION(m,"hasnumerichost",tqmask_kvs_fnc_hasnumerichost);
return true;
}
-static bool mask_module_cleanup(KviModule *m)
+static bool tqmask_module_cleanup(KviModule *m)
{
return true;
}
@@ -194,8 +194,8 @@ KVIRC_MODULE(
"1.0.0", // module version
"Copyright (C) 2002 Szymon Stefanek (pragma at kvirc dot net)",
"Mask manipulation functions",
- mask_module_init,
+ tqmask_module_init,
0,
0,
- mask_module_cleanup
+ tqmask_module_cleanup
)