summaryrefslogtreecommitdiffstats
path: root/src/modules/regchan/libkviregchan.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/regchan/libkviregchan.cpp')
-rw-r--r--src/modules/regchan/libkviregchan.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/src/modules/regchan/libkviregchan.cpp b/src/modules/regchan/libkviregchan.cpp
index eaa53268..4af15128 100644
--- a/src/modules/regchan/libkviregchan.cpp
+++ b/src/modules/regchan/libkviregchan.cpp
@@ -46,10 +46,10 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase;
@short:
Registers a channel
@syntax:
- regchan.add <channel:string> [netmask:string]
+ regchan.add <channel:string> [nettqmask:string]
@description:
- Registers the <channel> with the specified [netmask].
- [netmask] can be a full network name or a wildcard string
+ Registers the <channel> with the specified [nettqmask].
+ [nettqmask] can be a full network name or a wildcard string
tht will be matched against network names.
For example, if you want to register #kvirc on IRCNet
you can use regchan.add #kvirc IRCNet.
@@ -57,7 +57,7 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase;
you can use regchan.add #kvirc *[br]
Obviously if you register both #kvirc/IRCNet and #kvirc/*
then #kvirc/IRCNet will be looked first.
- If netmask is not passed a netmask of * is assumed.[br]
+ If nettqmask is not passed a nettqmask of * is assumed.[br]
@examples:
[example]
regchan.add #kvirc openprojects
@@ -67,13 +67,13 @@ extern KVIRC_API KviRegisteredChannelDataBase * g_pRegisteredChannelDataBase;
static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c)
{
- QString szChan,szNetmask;
+ TQString szChan,szNettqmask;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan)
- KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask)
+ KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask)
KVSM_PARAMETERS_END(c)
- if(szNetmask.isEmpty())szNetmask="*";
- g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNetmask));
+ if(szNettqmask.isEmpty())szNettqmask="*";
+ g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNettqmask));
return true;
}
@@ -91,12 +91,12 @@ static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c)
regchan.remove [-q|--quiet] [-e|--exactly] <channel:string> <network:string>
@description:
Unregisters the channel named <channel> that best matches <network>
- with its netmask.[br]
+ with its nettqmask.[br]
If no match for <channel>/<network> is found in the database then
a warning is printed unless -q is used.[br]
If -e is specified then <network> is not matched against the
- netmasks in the database but is compared directly. This means
- that <network> must be exactly the netmask used to register a channel.
+ nettqmasks in the database but is compared directly. This means
+ that <network> must be exactly the nettqmask used to register a channel.
@examples:
[example]
regchan.remove #kvirc openprojects
@@ -106,19 +106,19 @@ static bool regchan_kvs_cmd_add(KviKvsModuleCommandCall * c)
*/
static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c)
{
- QString szChan,szNetwork;
+ TQString szChan,szNetwork;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan)
KVSM_PARAMETER("network",KVS_PT_NONEMPTYSTRING,0,szNetwork)
KVSM_PARAMETERS_END(c)
KviRegisteredChannel * ch;
if(c->hasSwitch('e',"exactly"))ch = g_pRegisteredChannelDataBase->findExact(szChan,szNetwork);
- else ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork);
+ else ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork);
if(ch)
{
g_pRegisteredChannelDataBase->remove(ch);
} else {
- if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/netmask entry in the database"));
+ if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/nettqmask entry in the database"));
}
return true;
}
@@ -144,8 +144,8 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c)
No warning on screen.
!fn: -e|--exactly
If -e is specified then <network> is not matched against the
- netmasks in the database but is compared directly. This means
- that <network> must be exactly the netmask used to register a channel.
+ nettqmasks in the database but is compared directly. This means
+ that <network> must be exactly the nettqmask used to register a channel.
@examples:
[example]
regchan.setproperty #kvirc openprojects autojoin true
@@ -156,7 +156,7 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c)
static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c)
{
- QString szChan,szNetwork,szProperty,szValue;
+ TQString szChan,szNetwork,szProperty,szValue;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan)
KVSM_PARAMETER("network",KVS_PT_NONEMPTYSTRING,0,szNetwork)
@@ -165,7 +165,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_END(c)
KviRegisteredChannel * ch;
if(c->hasSwitch('e',"exactly"))ch = g_pRegisteredChannelDataBase->findExact(szChan,szNetwork);
- else ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork);
+ else ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork);
if(ch)
{
if(!szValue.isEmpty())
@@ -175,7 +175,7 @@ static bool regchan_kvs_cmd_setProperty(KviKvsModuleCommandCall * c)
ch->removeProperty(szProperty);
}
} else {
- if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/netmask entry in the database"));
+ if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/nettqmask entry in the database"));
}
return true;
}
@@ -230,11 +230,11 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c)
@short:
Get a list of registered channels
@syntax:
- <array> $regchan.list([<channel_mask:string>],[<network_mask:string>])
+ <array> $regchan.list([<channel_tqmask:string>],[<network_tqmask:string>])
@description:
- Returns an array of the channel@netmask entries in the registered
+ Returns an array of the channel@nettqmask entries in the registered
channels database.[br]
- Please note that <network_mask> is a wildcard string that will match
+ Please note that <network_tqmask> is a wildcard string that will match
wildcard strings.[br]
@examples:
[example]
@@ -244,20 +244,20 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c)
static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c)
{
- QString szChan,szNetmask;
+ TQString szChan,szNettqmask;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_STRING,KVS_PF_OPTIONAL,szChan)
- KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask)
+ KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask)
KVSM_PARAMETERS_END(c)
KviKvsArray* pArray = new KviKvsArray();
// KviKvsArray* pArrayCN = new KviKvsArray();
-// pArrayCN->set(0,new KviKvsVariant(QString("")));
-// pArrayCN->set(1,new KviKvsVariant(QString("")));
+// pArrayCN->set(0,new KviKvsVariant(TQString("")));
+// pArrayCN->set(1,new KviKvsVariant(TQString("")));
int aid=0;
if(szChan.isEmpty())szChan="*";
- if(szNetmask.isEmpty())szNetmask="*";
+ if(szNettqmask.isEmpty())szNettqmask="*";
KviPointerHashTable<const char *,KviRegisteredChannelList> * d = g_pRegisteredChannelDataBase->channelDict();
KviPointerHashTableIterator<const char *,KviRegisteredChannelList> it(*d);
@@ -265,14 +265,14 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c)
while(KviRegisteredChannelList * l = it.current())
{
for(KviRegisteredChannel * ch = l->first();ch;ch = l->next())
- if(KviQString::matchWildExpressionsCI(ch->name().ptr(),szChan) &&
- KviQString::matchWildExpressionsCI(ch->netMask().ptr(),szNetmask))
+ if(KviTQString::matchWildExpressionsCI(ch->name().ptr(),szChan) &&
+ KviTQString::matchWildExpressionsCI(ch->netMask().ptr(),szNettqmask))
{
-// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, netmask)
- pArray->set(aid,new KviKvsVariant(QString(ch->name()+"@"+ch->netMask())));
-// pArray->set(aid,new KviKvsVariant(QString(ch->name()));
-// pArrayCN->set(0,new KviKvsVariant(QString(ch->name())));
-// pArrayCN->set(1,new KviKvsVariant(QString(ch->netMask())));
+// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, nettqmask)
+ pArray->set(aid,new KviKvsVariant(TQString(ch->name()+"@"+ch->netMask())));
+// pArray->set(aid,new KviKvsVariant(TQString(ch->name()));
+// pArrayCN->set(0,new KviKvsVariant(TQString(ch->name())));
+// pArrayCN->set(1,new KviKvsVariant(TQString(ch->netMask())));
// pArray->set(aid,new KviKvsVariant(pArrayCN));
aid++;
}
@@ -305,13 +305,13 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c)
static bool regchan_kvs_fnc_property(KviKvsModuleFunctionCall * c)
{
- QString szChan,szNetwork,szPropertyName;
+ TQString szChan,szNetwork,szPropertyName;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan)
KVSM_PARAMETER("network",KVS_PT_STRING,0,szNetwork)
KVSM_PARAMETER("property name",KVS_PT_NONEMPTYSTRING,0,szPropertyName)
KVSM_PARAMETERS_END(c)
- KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork);
+ KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork);
if(ch)
{
KviStr * p = ch->property(szPropertyName);
@@ -338,54 +338,54 @@ static bool regchan_kvs_fnc_property(KviKvsModuleFunctionCall * c)
echo $regchan.match(#kvirc,$my.network)
[/example]
@seealso:
- [fnc]$regchan.find[/fnc]
+ [fnc]$regchan.tqfind[/fnc]
*/
static bool regchan_kvs_fnc_match(KviKvsModuleFunctionCall * c)
{
- QString szChan,szNetwork;
+ TQString szChan,szNetwork;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan)
KVSM_PARAMETER("network",KVS_PT_STRING,0,szNetwork)
KVSM_PARAMETERS_END(c)
- KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetwork);
+ KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNetwork);
c->returnValue()->setBoolean(ch);
return true;
}
/*
- @doc: regchan.find
+ @doc: regchan.tqfind
@type:
function
@title:
- $regchan.find
+ $regchan.tqfind
@short:
Checks if a channel is registered
@syntax:
- <boolean> $regchan.find(<channel_name:string>,<netmask:string>)
+ <boolean> $regchan.tqfind(<channel_name:string>,<nettqmask:string>)
@description:
- Returns 1 if the channel identified by <channel_name> and <netmask>
+ Returns 1 if the channel identified by <channel_name> and <nettqmask>
is registered and 0 otherwise. This function is similar to $regchan.match
- but for $regchan.find the second parameter is the exact netmask
+ but for $regchan.find the second parameter is the exact nettqmask
of the registered channel entry.
@examples:
[example]
- echo $regchan.find(#kvirc,IRCNet)
- echo $regchan.find(#kvirc,*)
+ echo $regchan.tqfind(#kvirc,IRCNet)
+ echo $regchan.tqfind(#kvirc,*)
[/example]
@seealso:
[fnc]$regchan.match[/fnc]
*/
-static bool regchan_kvs_fnc_find(KviKvsModuleFunctionCall * c)
+static bool regchan_kvs_fnc_tqfind(KviKvsModuleFunctionCall * c)
{
- QString szChan,szNetmask;
+ TQString szChan,szNettqmask;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan)
- KVSM_PARAMETER("netmask",KVS_PT_STRING,0,szNetmask)
+ KVSM_PARAMETER("nettqmask",KVS_PT_STRING,0,szNettqmask)
KVSM_PARAMETERS_END(c)
- KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetmask);
+ KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->tqfind(szChan,szNettqmask);
c->returnValue()->setBoolean(ch);
return true;
}
@@ -398,7 +398,7 @@ static bool regchan_module_init(KviModule * m)
KVSM_REGISTER_SIMPLE_COMMAND(m,"setProperty",regchan_kvs_cmd_setProperty);
KVSM_REGISTER_FUNCTION(m,"property",regchan_kvs_fnc_property);
KVSM_REGISTER_FUNCTION(m,"match",regchan_kvs_fnc_match);
- KVSM_REGISTER_FUNCTION(m,"find",regchan_kvs_fnc_find);
+ KVSM_REGISTER_FUNCTION(m,"tqfind",regchan_kvs_fnc_tqfind);
KVSM_REGISTER_FUNCTION(m,"list",regchan_kvs_fnc_list);
return true;