summaryrefslogtreecommitdiffstats
path: root/src/modules/reguser/libkvireguser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/reguser/libkvireguser.cpp')
-rw-r--r--src/modules/reguser/libkvireguser.cpp324
1 files changed, 162 insertions, 162 deletions
diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp
index 49e4a204..b8363175 100644
--- a/src/modules/reguser/libkvireguser.cpp
+++ b/src/modules/reguser/libkvireguser.cpp
@@ -40,7 +40,7 @@
#include "dialog.h"
#include "kvi_pointerlist.h"
-#include <qsplitter.h> // FIXME: REmove this!
+#include <tqsplitter.h> // FIXME: REmove this!
//#warning "$reguser.matches..."
//#warning "$reguser.clear"
@@ -68,16 +68,16 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0;
The reguser module is the scripting interface to the [doc:registered_users]registered users database[/doc].[br]
It provides the following set of commands:[br]
[cmd]reguser.add[/cmd]: adds an user entry to the database[br]
- [cmd]reguser.addmask[/cmd]: adds an user's mask to the database[br]
+ [cmd]reguser.addtqmask[/cmd]: adds an user's tqmask to the database[br]
[cmd]reguser.remove[/cmd]: removes an user entry from the database[br]
[fnc]$reguser.list[/fnc]: lists the entries[br]
[cmd]reguser.setproperty[/cmd]: sets a property associated to an entry[br]
[cmd]reguser.edit[/cmd]: shows an editor for an user entry
- [fnc]$reguser.match[/fnc](): finds an entry by matching masks[br]
- [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing masks[br]
+ [fnc]$reguser.match[/fnc](): finds an entry by matching tqmasks[br]
+ [fnc]$reguser.exactMatch[/fnc](): finds an entry by comparing tqmasks[br]
[fnc]$reguser.property[/fnc](): finds a property associated to an entry[br]
[fnc]$reguser.matchProperty[/fnc](): shortcut for [fnc]$reguser.property[/fnc]([fnc]$reguser.match[/fnc]())[br]
- [fnc]$reguser.mask[/fnc](): returns the registration masks for an entry
+ [fnc]$reguser.tqmask[/fnc](): returns the registration tqmasks for an entry
*/
/*
@@ -105,7 +105,7 @@ KviRegisteredUsersDialog * g_pRegisteredUsersDialog = 0;
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc]
*/
@@ -115,14 +115,14 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c)
{
if(c->hasSwitch('t',"toplevel"))
{
- if(g_pRegisteredUsersDialog->parent())
+ if(g_pRegisteredUsersDialog->tqparent())
{
- g_pRegisteredUsersDialog->reparent(0,QPoint(0,0),true);
+ g_pRegisteredUsersDialog->reparent(0,TQPoint(0,0),true);
}
} else {
- if(g_pRegisteredUsersDialog->parent() != c->window()->frame()->splitter())
+ if(TQT_BASE_OBJECT(g_pRegisteredUsersDialog->tqparent()) != TQT_BASE_OBJECT(c->window()->frame()->splitter()))
{
- g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),QPoint(0,0),true);
+ g_pRegisteredUsersDialog->reparent(c->window()->frame()->splitter(),TQPoint(0,0),true);
}
}
} else {
@@ -150,19 +150,19 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c)
@short:
Registers an user
@syntax:
- reguser.add [-r] [-f] [-q] [-g=group] <name> [mask]
+ reguser.add [-r] [-f] [-q] [-g=group] <name> [tqmask]
@description:
Adds a new entry with the specified <name> to the database.[br]
If the database contains an entry with the same <name>, this command just prints
a warning and returns.[br]
- If no [mask] is given the new entry has no registration masks: so it can't be "matched" yet. You have to add
- at least one mask with [cmd]reguser.addmask[/cmd].
- If [mask] is given, then it is added to the entry mask list.[br]
+ If no [tqmask] is given the new entry has no registration tqmasks: so it can't be "matched" yet. You have to add
+ at least one tqmask with [cmd]reguser.addtqmask[/cmd].
+ If [tqmask] is given, then it is added to the entry tqmask list.[br]
The <name> parameter may contain any character: even spaces are allowed (obviously you have to
use quotes in that case).[br]
If the '-r' switch is given , the new entry replaces any previous one with the same <name> (the old entry is removed).[br]
If the '-f' switch is given , and there is an existing entry with the same name , no warning is printed
- and the old entry is treated just like it has been just added (thus the [mask] is eventually added to its mask list).[br]
+ and the old entry is treated just like it has been just added (thus the [tqmask] is eventually added to its tqmask list).[br]
The '-q' switch causes the command to run in "quiet" mode and print no warning.[br]
@examples:
[example]
@@ -172,17 +172,17 @@ static bool reguser_kvs_cmd_edit(KviKvsModuleCommandCall * c)
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc]
*/
static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c)
{
- QString szName;
- QString szMask;
+ TQString szName;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETERS_END(c)
if(szName.isEmpty())
{
@@ -190,11 +190,11 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c)
return true;
}
- if(c->hasSwitch('r',"replace"))g_pRegisteredUserDataBase->removeUser(szName);
+ if(c->hasSwitch('r',"tqreplace"))g_pRegisteredUserDataBase->removeUser(szName);
KviRegisteredUser * u = g_pRegisteredUserDataBase->addUser(szName);
- QString group;
+ TQString group;
if(c->hasSwitch('g',"group"))
{
c->switches()->getAsStringIfExisting('g',"group",group);
@@ -253,13 +253,13 @@ static bool reguser_kvs_cmd_add(KviKvsModuleCommandCall * c)
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc]
*/
static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c)
{
- QString szName;
+ TQString szName;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
KVSM_PARAMETERS_END(c)
@@ -280,51 +280,51 @@ static bool reguser_kvs_cmd_remove(KviKvsModuleCommandCall * c)
}
/*
- @doc: reguser.addmask
+ @doc: reguser.addtqmask
@type:
command
@title:
- reguser.addmask
+ reguser.addtqmask
@keyterms:
registering users
@short:
- Adds a mask to a registered user
+ Adds a tqmask to a registered user
@syntax:
- reguser.addmask [-f] <name> <mask>
+ reguser.addtqmask [-f] <name> <tqmask>
@description:
- Adds a registration mask to the database entry with name <name>.[br]
- The <mask> has the common [doc:irc_masks]irc mask[/doc] format.[br]
- The only restriction on the <mask> is that it must be unique inside the
- regusers database: you can't match two users with the same mask (it would
+ Adds a registration tqmask to the database entry with name <name>.[br]
+ The <tqmask> has the common [doc:irc_tqmasks]irc tqmask[/doc] format.[br]
+ The only restriction on the <tqmask> is that it must be unique inside the
+ regusers database: you can't match two users with the same tqmask (it would
have rather undefined results).[br]
- If -f is used , KVIrc ensures that the mask is unique in the database
+ If -f is used , KVIrc ensures that the tqmask is unique in the database
and associates is to THIS registered user (breaking the previous associations).<br>
- Once at least one mask has been added, the user can be "matched"
+ Once at least one tqmask has been added, the user can be "matched"
by using the [fnc]$reguser.match[/fnc]() function.[br]
- Each database entry can have an unlimited number of masks.[br]
+ Each database entry can have an unlimited number of tqmasks.[br]
@examples:
[example]
[cmd]reguser.add[/cmd] "Szymon Stefanek"
- reguser.addmask "Szymon Stefanek" Pragma!*@*.it
+ reguser.addtqmask "Szymon Stefanek" Pragma!*@*.it
[/example]
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.delmask[/cmd],
+ [cmd]reguser.deltqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.exactMatch[/fnc]
*/
-static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c)
+static bool reguser_kvs_cmd_addtqmask(KviKvsModuleCommandCall * c)
{
- QString szName;
- QString szMask;
+ TQString szName;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETERS_END(c)
if(szName.isEmpty())
@@ -335,7 +335,7 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c)
if(szMask.isEmpty())
{
- c->warning(__tr2qs("No mask specified"));
+ c->warning(__tr2qs("No tqmask specified"));
return true;
}
@@ -357,27 +357,27 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c)
}
/*
- @doc: reguser.delmask
+ @doc: reguser.deltqmask
@type:
command
@title:
- reguser.delmask
+ reguser.deltqmask
@keyterms:
registering users
@short:
- Removes a mask from the regusers database
+ Removes a tqmask from the regusers database
@syntax:
- reguser.delmask <mask>
+ reguser.deltqmask <tqmask>
@description:
- Removes a mask from the regusers database.[br]
- Since masks are unique in the database , you don't need to pass
- an <user> parameter: if an <user> entry has the <mask>, removing that <mask>
+ Removes a tqmask from the regusers database.[br]
+ Since tqmasks are unique in the database , you don't need to pass
+ an <user> parameter: if an <user> entry has the <tqmask>, removing that <tqmask>
will surely remove it from that <user> entry. (contorsions ?)[br]
@examples:
[example]
[cmd]reguser.add[/cmd] "Szymon Stefanek"
- [cmd]reguser.addmask[/cmd] "Szymon Stefanek" Pragma!*@*.it
- reguser.delmask Pragma!*@*.it
+ [cmd]reguser.addtqmask[/cmd] "Szymon Stefanek" Pragma!*@*.it
+ reguser.deltqmask Pragma!*@*.it
[fnc]$reguser.list[/fnc]
[/example]
@seealso:
@@ -385,22 +385,22 @@ static bool reguser_kvs_cmd_addmask(KviKvsModuleCommandCall * c)
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.exactMatch[/fnc]
*/
-static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c)
+static bool reguser_kvs_cmd_deltqmask(KviKvsModuleCommandCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETERS_END(c)
if(szMask.isEmpty())
{
- c->warning(__tr2qs("No mask specified"));
+ c->warning(__tr2qs("No tqmask specified"));
return true;
}
@@ -440,7 +440,7 @@ static bool reguser_kvs_cmd_delmask(KviKvsModuleCommandCall * c)
static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c)
{
- QString szName;
+ TQString szName;
bool bEnabled;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
@@ -507,7 +507,7 @@ static bool reguser_kvs_cmd_setIgnoreEnabled(KviKvsModuleCommandCall * c)
static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c)
{
- QString szName;
+ TQString szName;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
KVSM_PARAMETERS_END(c)
@@ -564,8 +564,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c)
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
- [cmd]reguser.delmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
+ [cmd]reguser.deltqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.matchProperty[/fnc]
@@ -573,8 +573,8 @@ static bool reguser_kvs_cmd_setIgnoreFlags(KviKvsModuleCommandCall * c)
static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c)
{
- QString szName;
- QString szFlags;
+ TQString szName;
+ TQString szFlags;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
KVSM_PARAMETERS_END(c)
@@ -619,8 +619,8 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c)
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
- [cmd]reguser.delmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
+ [cmd]reguser.deltqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.matchProperty[/fnc]
@@ -628,7 +628,7 @@ static bool reguser_kvs_fnc_getIgnoreFlags(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c)
{
- QString szName;
+ TQString szName;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
KVSM_PARAMETERS_END(c)
@@ -681,11 +681,11 @@ static bool reguser_kvs_fnc_isIgnoreEnabled(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c)
{
- QString szName;
- QString szProperty;
- QString szValue;
+ TQString szName;
+ TQString szProperty;
+ TQString szValue;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,0,szName)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,0,szName)
KVSM_PARAMETER("property",KVS_PT_STRING,0,szProperty)
KVSM_PARAMETER("value",KVS_PT_STRING,KVS_PF_OPTIONAL,szValue)
KVSM_PARAMETERS_END(c)
@@ -720,46 +720,46 @@ static bool reguser_kvs_cmd_setproperty(KviKvsModuleCommandCall * c)
@title:
$reguser.list
@short:
- Get a list of registered user masks
+ Get a list of registered user tqmasks
@syntax:
- $reguser.list([mask])
+ $reguser.list([tqmask])
@description:
Returns an array of the entries in the registered users database.[br]
- If <mask> is specified, only entries matching the <mask>
- and the entries with no registration masks are listed.[br]
- Please note that <mask> is a wildcard string that will match
+ If <tqmask> is specified, only entries matching the <tqmask>
+ and the entries with no registration tqmasks are listed.[br]
+ Please note that <tqmask> is a wildcard string that will match
wildcard strings... don't get messed with that :D[br]
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.exactMatch[/fnc]
*/
static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("user_mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
+ KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mask(szMask);
+ KviIrcMask tqmask(szMask);
KviKvsArray* pArray = new KviKvsArray();
int aid=0;
int cnt = 0;
- KviPointerHashTable<QString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
- KviPointerHashTableIterator<QString,KviRegisteredUser> it(*d);
+ KviPointerHashTable<TQString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
+ KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*d);
while(KviRegisteredUser * u = it.current())
{
- KviPointerList<KviIrcMask> * ml = u->maskList();
- if(u->matches(mask) || (ml->count() == 0))
+ KviPointerList<KviIrcMask> * ml = u->tqmaskList();
+ if(u->matches(tqmask) || (ml->count() == 0))
{
pArray->set(aid,new KviKvsVariant(u->name()));
aid++;
@@ -781,12 +781,12 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c)
@short:
Lists the registered users
@syntax:
- reguser.showlist [mask]
+ reguser.showlist [tqmask]
@description:
Lists the entries in the registered users database.[br]
- If <mask> is specified, only entries matching the <mask>
- and the entries with no registration masks are listed.[br]
- Please note that <mask> is a wildcard string that will match
+ If <tqmask> is specified, only entries matching the <tqmask>
+ and the entries with no registration tqmasks are listed.[br]
+ Please note that <tqmask> is a wildcard string that will match
wildcard strings... don't get messed with that :D[br]
@seealso:
[module:reguser]Registered users database interface[/module],
@@ -799,28 +799,28 @@ static bool reguser_kvs_fnc_list(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mask(szMask);
+ KviIrcMask tqmask(szMask);
c->window()->outputNoFmt(KVI_OUT_SYSTEMMESSAGE,__tr2qs("Registered users database dump:"));
int count = 0;
- KviPointerHashTable<QString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
- KviPointerHashTableIterator<QString,KviRegisteredUser> it(*d);
+ KviPointerHashTable<TQString,KviRegisteredUser> * d = g_pRegisteredUserDataBase->userDict();
+ KviPointerHashTableIterator<TQString,KviRegisteredUser> it(*d);
while(KviRegisteredUser * u = it.current())
{
- KviPointerList<KviIrcMask> * ml = u->maskList();
- if(u->matches(mask) || (ml->count() == 0))
+ KviPointerList<KviIrcMask> * ml = u->tqmaskList();
+ if(u->matches(tqmask) || (ml->count() == 0))
{
c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" User: %c%Q"),KVI_TEXT_BOLD,&(u->name()));
if(ml->count() == 0)
{
- c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration masks"));
+ c->window()->output(KVI_OUT_SYSTEMWARNING,__tr2qs(" Warning: this user has no registration tqmasks"));
} else {
for(KviIrcMask * m = ml->first();m;m = ml->next())
{
@@ -828,13 +828,13 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c)
}
}
- KviPointerHashTable<QString,QString> * pd = u->propertyDict();
+ KviPointerHashTable<TQString,TQString> * pd = u->propertyDict();
if(pd)
{
- KviPointerHashTableIterator<QString,QString> pdit(*pd);
+ KviPointerHashTableIterator<TQString,TQString> pdit(*pd);
while(pdit.current())
{
- QString key = pdit.currentKey();
+ TQString key = pdit.currentKey();
c->window()->output(KVI_OUT_SYSTEMMESSAGE,__tr2qs(" Property: %Q=%Q"),&(key),pdit.current());
++pdit;
}
@@ -859,30 +859,30 @@ static bool reguser_kvs_cmd_showlist(KviKvsModuleCommandCall * c)
@short:
Returns an entry in the registered user database
@syntax:
- $reguser.match(<user_mask>)
+ $reguser.match(<user_tqmask>)
@description:
- Returns the name of the first entry matching <user_mask> in the registered user database.[br]
- The <user_mask> has the common [doc:irc_masks]irc mask[/doc] format but can't contain wildcards.[br]
+ Returns the name of the first entry matching <user_tqmask> in the registered user database.[br]
+ The <user_tqmask> has the common [doc:irc_tqmasks]irc tqmask[/doc] format but can't contain wildcards.[br]
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.exactMatch[/fnc]
*/
static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mask(szMask);
-//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host());
- KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host());
+ KviIrcMask tqmask(szMask);
+//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host());
+ KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host());
if(u) c->returnValue()->setString(u->name());
return true;
}
@@ -896,29 +896,29 @@ static bool reguser_kvs_fnc_match(KviKvsModuleFunctionCall * c)
@short:
Returns an entry in the registered user database
@syntax:
- $reguser.exactMatch(<user_mask>)
+ $reguser.exactMatch(<user_tqmask>)
@description:
- Returns the name of the registered user database entry that has <user_mask> in its registration mask list.[br]
- The <user_mask> has the common [doc:irc_masks]wild irc mask[/doc] format and can contain wildcards.[br]
+ Returns the name of the registered user database entry that has <user_tqmask> in its registration tqmask list.[br]
+ The <user_tqmask> has the common [doc:irc_tqmasks]wild irc tqmask[/doc] format and can contain wildcards.[br]
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc]
*/
static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETERS_END(c)
- KviIrcMask mask(szMask);
- KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(mask);
+ KviIrcMask tqmask(szMask);
+ KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserWithMask(tqmask);
if(u) c->returnValue()->setString(u->name());
return true;
}
@@ -932,24 +932,24 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c)
// @short:
// Returns entries in the registered user database
// @syntax:
-// $reguser.matches(<user_mask>)
+// $reguser.matches(<user_tqmask>)
// @description:
-// Returns a comma separated list of registered user masks that match <user_mask>.[br]
-// User mask must be in the format <nick>!<user>@<host> , where <user> and
+// Returns a comma separated list of registered user tqmasks that match <user_tqmask>.[br]
+// User tqmask must be in the format <nick>!<user>@<host> , where <user> and
// <host> may contain '*' wildcards.[br]
-// If no registered mask matches the <user_mask> an empty string is returned.[br]
+// If no registered tqmask matches the <user_tqmask> an empty string is returned.[br]
// @seealso:
// [module:reguser]reguser module documentation[/module]
//*/
-//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * mask,KviStr & buffer)
+//static void search_reguser_list(KviRegisteredUserList * l,KviWindow * w,const char * tqmask,KviStr & buffer)
//{
// for(KviRegisteredUser * u = l->first();u;u = l->next())
// {
-// if(u->matches(mask))
+// if(u->matches(tqmask))
// {
// if(buffer.hasData())buffer.append(',');
-// buffer.append(u->mask());
+// buffer.append(u->tqmask());
// }
// }
//}
@@ -977,43 +977,43 @@ static bool reguser_kvs_fnc_exactMatch(KviKvsModuleFunctionCall * c)
/*
- @doc: reguser.mask
+ @doc: reguser.tqmask
@type:
function
@title:
- $reguser.mask
+ $reguser.tqmask
@short:
- Returns the registration masks for a db entry
+ Returns the registration tqmasks for a db entry
@syntax:
- $reguser.mask(<name>[,<N>])
+ $reguser.tqmask(<name>[,<N>])
@description:
- Returns the <N>th registration mask for the registered user database record identified
- by <name>. If <N> is not given , returns an array of registration masks for that entry.[br]
+ Returns the <N>th registration tqmask for the registered user database record identified
+ by <name>. If <N> is not given , returns an array of registration tqmasks for that entry.[br]
If <name> does not identify a valid entry an empty string is returned;
- if <N> is out of range (or there are no masks at all) , an empty string is returned.[br]
+ if <N> is out of range (or there are no tqmasks at all) , an empty string is returned.[br]
<N> is a ZERO BASED index.[br]
@examples:
[example]
[cmd]reguser.add[/cmd] Pragma
- [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it
- [cmd]echo[/cmd] $reguser.mask(Pragma,0)
+ [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it
+ [cmd]echo[/cmd] $reguser.tqmask(Pragma,0)
[/example]
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
- [cmd]reguser.delmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
+ [cmd]reguser.deltqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.matchProperty[/fnc]
*/
-static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c)
+static bool reguser_kvs_fnc_tqmask(KviKvsModuleFunctionCall * c)
{
- QString szName;
- QString szN;
+ TQString szName;
+ TQString szN;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("name",KVS_PT_STRING,0,szName)
KVSM_PARAMETER("N",KVS_PT_STRING,KVS_PF_OPTIONAL,szN)
@@ -1027,13 +1027,13 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c)
KviStr n = szName;
if(n.hasData() && n.isUnsignedNum())
{
- KviIrcMask * m = u->maskList()->at(n.toInt());
+ KviIrcMask * m = u->tqmaskList()->at(n.toInt());
if(m) c->returnValue()->setString(m->nick()+"!"+m->user()+"@"+m->host());
} else {
int id=0;
- for(KviIrcMask * m = u->maskList()->first();m;m = u->maskList()->next())
+ for(KviIrcMask * m = u->tqmaskList()->first();m;m = u->tqmaskList()->next())
{
- pArray->set(aid,new KviKvsVariant(QString(m->nick()+"!"+m->user()+"@"+m->host())));
+ pArray->set(aid,new KviKvsVariant(TQString(m->nick()+"!"+m->user()+"@"+m->host())));
aid++;
}
c->returnValue()->setArray(pArray);
@@ -1058,7 +1058,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c)
@examples:
[example]
[cmd]reguser.add[/cmd] Pragma
- [cmd]reguser.addmask[/cmd] Pragma Pragma!*@*.it
+ [cmd]reguser.addtqmask[/cmd] Pragma Pragma!*@*.it
[cmd]reguser.setproperty[/cmd] Pragma isDev 1
[cmd]echo[/cmd] $reguser.property(Pragma,isDev)
[/example]
@@ -1067,7 +1067,7 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c)
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.matchProperty[/fnc]
@@ -1075,8 +1075,8 @@ static bool reguser_kvs_fnc_mask(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c)
{
- QString szName;
- QString szProperty;
+ TQString szName;
+ TQString szProperty;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("user_name",KVS_PT_STRING,0,szName)
KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty)
@@ -1085,7 +1085,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c)
KviRegisteredUser * u = g_pRegisteredUserDataBase->findUserByName(szName);
if(u)
{
- QString tmp;
+ TQString tmp;
u->getProperty(szProperty,tmp);
c->returnValue()->setString(tmp);
}
@@ -1100,19 +1100,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c)
@short:
Returns a property of an entry in the registered user database
@syntax:
- $reguser.matchProperty(<user_mask>,<property_name>)
+ $reguser.matchProperty(<user_tqmask>,<property_name>)
@description:
Returns the value of the property identified by <property_name> and
- bound to the first entry matched by by <user_mask>.[br]
+ bound to the first entry matched by by <user_tqmask>.[br]
If the property is not set, an empty string is returned.[br]
- If no entry matches <user_mask> this function returns an empty string
+ If no entry matches <user_tqmask> this function returns an empty string
and does not print any error.[br]
[example]
- %property = $reguser.matchProperty(<user_mask>,<property_name>)
+ %property = $reguser.matchProperty(<user_tqmask>,<property_name>)
[/example]
Is actually a shortcut for:[br]
[example]
- %tmp = [fnc]$reguser.match[/fnc](<user_mask>)
+ %tmp = [fnc]$reguser.match[/fnc](<user_tqmask>)
if("%tmp" != "")%property = $reguser.property(%tmp,<property_name>)
[/example]
@seealso:
@@ -1120,7 +1120,7 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c)
[doc:registered_users]Registered users database[/doc],
[cmd]reguser.add[/cmd],
[cmd]reguser.remove[/cmd],
- [cmd]reguser.addmask[/cmd],
+ [cmd]reguser.addtqmask[/cmd],
[fnc]$reguser.list[/fnc],
[fnc]$reguser.match[/fnc],
[fnc]$reguser.property[/fnc]
@@ -1128,19 +1128,19 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c)
{
- QString szMask;
- QString szProperty;
+ TQString szMask;
+ TQString szProperty;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("user_mask",KVS_PT_STRING,0,szMask)
+ KVSM_PARAMETER("user_tqmask",KVS_PT_STRING,0,szMask)
KVSM_PARAMETER("property_name",KVS_PT_STRING,KVS_PF_OPTIONAL,szProperty)
KVSM_PARAMETERS_END(c)
- KviIrcMask mask(szMask);
-//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(mask.nick(),mask.user(),mask.host());
- KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(mask.nick(),mask.user(),mask.host());
+ KviIrcMask tqmask(szMask);
+//FIXME: it crashes kvirc KviRegisteredUser * u = c->context()->connection()->userDataBase()->registeredUser(tqmask.nick(),tqmask.user(),tqmask.host());
+ KviRegisteredUser * u = g_pRegisteredUserDataBase->findMatchingUser(tqmask.nick(),tqmask.user(),tqmask.host());
if(u)
{
- QString tmp;
+ TQString tmp;
u->getProperty(szProperty,tmp);
c->returnValue()->setString(tmp);
}
@@ -1158,10 +1158,10 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c)
@short:
Shows a registration wizard dialog
@syntax:
- reguser.wizard [mask]
+ reguser.wizard [tqmask]
@description:
Allows registering an user with an intuitive and easy to use interface.
- If [mask] is specified , it is used as inital mask in the dialog.
+ If [tqmask] is specified , it is used as inital tqmask in the dialog.
@seealso:
[module:reguser]Registered users database interface[/module],
[doc:registered_users]Registered users database[/doc],
@@ -1170,9 +1170,9 @@ static bool reguser_kvs_fnc_matchProperty(KviKvsModuleFunctionCall * c)
static bool reguser_kvs_cmd_wizard(KviKvsModuleCommandCall * c)
{
- QString szMask;
+ TQString szMask;
KVSM_PARAMETERS_BEGIN(c)
- KVSM_PARAMETER("mask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
+ KVSM_PARAMETER("tqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szMask)
KVSM_PARAMETERS_END(c)
KviRegistrationWizard * w = new KviRegistrationWizard(szMask);
@@ -1188,8 +1188,8 @@ static bool reguser_module_init(KviModule * m)
KVSM_REGISTER_SIMPLE_COMMAND(m,"add",reguser_kvs_cmd_add);
KVSM_REGISTER_SIMPLE_COMMAND(m,"remove",reguser_kvs_cmd_remove);
- KVSM_REGISTER_SIMPLE_COMMAND(m,"addmask",reguser_kvs_cmd_addmask);
- KVSM_REGISTER_SIMPLE_COMMAND(m,"delmask",reguser_kvs_cmd_delmask);
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"addtqmask",reguser_kvs_cmd_addtqmask);
+ KVSM_REGISTER_SIMPLE_COMMAND(m,"deltqmask",reguser_kvs_cmd_deltqmask);
KVSM_REGISTER_SIMPLE_COMMAND(m,"edit",reguser_kvs_cmd_edit);
KVSM_REGISTER_SIMPLE_COMMAND(m,"showlist",reguser_kvs_cmd_showlist);
KVSM_REGISTER_SIMPLE_COMMAND(m,"setproperty",reguser_kvs_cmd_setproperty);
@@ -1200,7 +1200,7 @@ static bool reguser_module_init(KviModule * m)
KVSM_REGISTER_FUNCTION(m,"match",reguser_kvs_fnc_match);
KVSM_REGISTER_FUNCTION(m,"list",reguser_kvs_fnc_list);
KVSM_REGISTER_FUNCTION(m,"exactMatch",reguser_kvs_fnc_exactMatch);
- KVSM_REGISTER_FUNCTION(m,"mask",reguser_kvs_fnc_mask);
+ KVSM_REGISTER_FUNCTION(m,"tqmask",reguser_kvs_fnc_tqmask);
KVSM_REGISTER_FUNCTION(m,"property",reguser_kvs_fnc_property);
KVSM_REGISTER_FUNCTION(m,"matchProperty",reguser_kvs_fnc_matchProperty);
KVSM_REGISTER_FUNCTION(m,"getIgnoreFlags",reguser_kvs_fnc_getIgnoreFlags);