diff options
Diffstat (limited to 'src/modules/regchan/libkviregchan.cpp')
-rw-r--r-- | src/modules/regchan/libkviregchan.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/src/modules/regchan/libkviregchan.cpp b/src/modules/regchan/libkviregchan.cpp index cc00fecd..fe38cf34 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> [nettqmask:string] + regchan.add <channel:string> [netmask:string] @description: - Registers the <channel> with the specified [nettqmask]. - [nettqmask] can be a full network name or a wildcard string + Registers the <channel> with the specified [netmask]. + [netmask] 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 nettqmask is not passed a nettqmask of * is assumed.[br] + If netmask is not passed a netmask 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) { - TQString szChan,szNettqmask; + TQString szChan,szNetmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_NONEMPTYSTRING,0,szChan) - KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask) + KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask) KVSM_PARAMETERS_END(c) - if(szNettqmask.isEmpty())szNettqmask="*"; - g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNettqmask)); + if(szNetmask.isEmpty())szNetmask="*"; + g_pRegisteredChannelDataBase->add(new KviRegisteredChannel(szChan,szNetmask)); 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 nettqmask.[br] + with its netmask.[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 nettqmask used to register a channel. + that <network> must be exactly the netmask used to register a channel. @examples: [example] regchan.remove #kvirc openprojects @@ -118,7 +118,7 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) { g_pRegisteredChannelDataBase->remove(ch); } else { - if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/nettqmask entry in the database")); + if(!c->hasSwitch('q',"quiet"))c->warning(__tr2qs("No such channel/netmask entry in the database")); } return true; } @@ -145,7 +145,7 @@ static bool regchan_kvs_cmd_remove(KviKvsModuleCommandCall * c) !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 nettqmask used to register a channel. + that <network> must be exactly the netmask used to register a channel. @examples: [example] regchan.setproperty #kvirc openprojects autojoin true @@ -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/nettqmask entry in the database")); + if(!c->hasSwitch('q',"quiet")) c->warning(__tr2qs("No such channel/netmask 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_tqmask:string>],[<network_tqmask:string>]) + <array> $regchan.list([<channel_mask:string>],[<network_mask:string>]) @description: - Returns an array of the channel@nettqmask entries in the registered + Returns an array of the channel@netmask entries in the registered channels database.[br] - Please note that <network_tqmask> is a wildcard string that will match + Please note that <network_mask> is a wildcard string that will match wildcard strings.[br] @examples: [example] @@ -244,10 +244,10 @@ static bool regchan_kvs_cmd_showlist(KviKvsModuleCommandCall * c) static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) { - TQString szChan,szNettqmask; + TQString szChan,szNetmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,KVS_PF_OPTIONAL,szChan) - KVSM_PARAMETER("nettqmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNettqmask) + KVSM_PARAMETER("netmask",KVS_PT_STRING,KVS_PF_OPTIONAL,szNetmask) KVSM_PARAMETERS_END(c) KviKvsArray* pArray = new KviKvsArray(); @@ -257,7 +257,7 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) int aid=0; if(szChan.isEmpty())szChan="*"; - if(szNettqmask.isEmpty())szNettqmask="*"; + if(szNetmask.isEmpty())szNetmask="*"; KviPointerHashTable<const char *,KviRegisteredChannelList> * d = g_pRegisteredChannelDataBase->channelDict(); KviPointerHashTableIterator<const char *,KviRegisteredChannelList> it(*d); @@ -266,9 +266,9 @@ static bool regchan_kvs_fnc_list(KviKvsModuleFunctionCall * c) { for(KviRegisteredChannel * ch = l->first();ch;ch = l->next()) if(KviTQString::matchWildExpressionsCI(ch->name().ptr(),szChan) && - KviTQString::matchWildExpressionsCI(ch->netMask().ptr(),szNettqmask)) + KviTQString::matchWildExpressionsCI(ch->netMask().ptr(),szNetmask)) { -// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, nettqmask) +// FIXME: WE NEED TO RETURN AN ARRAY OF 2-ELEMENT ARRAYS (chan name, netmask) 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()))); @@ -363,11 +363,11 @@ static bool regchan_kvs_fnc_match(KviKvsModuleFunctionCall * c) @short: Checks if a channel is registered @syntax: - <boolean> $regchan.find(<channel_name:string>,<nettqmask:string>) + <boolean> $regchan.find(<channel_name:string>,<netmask:string>) @description: - Returns 1 if the channel identified by <channel_name> and <nettqmask> + Returns 1 if the channel identified by <channel_name> and <netmask> is registered and 0 otherwise. This function is similar to $regchan.match - but for $regchan.find the second parameter is the exact nettqmask + but for $regchan.find the second parameter is the exact netmask of the registered channel entry. @examples: [example] @@ -380,12 +380,12 @@ static bool regchan_kvs_fnc_match(KviKvsModuleFunctionCall * c) static bool regchan_kvs_fnc_find(KviKvsModuleFunctionCall * c) { - TQString szChan,szNettqmask; + TQString szChan,szNetmask; KVSM_PARAMETERS_BEGIN(c) KVSM_PARAMETER("channel name",KVS_PT_STRING,0,szChan) - KVSM_PARAMETER("nettqmask",KVS_PT_STRING,0,szNettqmask) + KVSM_PARAMETER("netmask",KVS_PT_STRING,0,szNetmask) KVSM_PARAMETERS_END(c) - KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNettqmask); + KviRegisteredChannel * ch = g_pRegisteredChannelDataBase->find(szChan,szNetmask); c->returnValue()->setBoolean(ch); return true; } |