diff options
| author | 2017-08-25 12:07:04 +0200 | |
|---|---|---|
| committer | 2017-08-25 12:07:04 +0200 | |
| commit | bff6c4d1d3b34e5c4c3fb83f9439b4427f75a363 (patch) | |
| tree | d8ebbabf69b237556205b9d3f62ae50a1ce51652 /src/modules | |
| parent | Fix the text of all links in the documentation being lowercase. (diff) | |
| download | KVIrc-bff6c4d1d3b34e5c4c3fb83f9439b4427f75a363.tar.gz KVIrc-bff6c4d1d3b34e5c4c3fb83f9439b4427f75a363.tar.bz2 KVIrc-bff6c4d1d3b34e5c4c3fb83f9439b4427f75a363.zip | |
Remove lots of redundant line feeds around block elements in the docs.
Diffstat (limited to 'src/modules')
| -rw-r--r-- | src/modules/addon/libkviaddon.cpp | 2 | ||||
| -rw-r--r-- | src/modules/context/libkvicontext.cpp | 2 | ||||
| -rw-r--r-- | src/modules/dcc/libkvidcc.cpp | 66 | ||||
| -rw-r--r-- | src/modules/dialog/libkvidialog.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_lineEdit.cpp | 4 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_multiLineEdit.cpp | 2 | ||||
| -rw-r--r-- | src/modules/objects/KvsObject_wrapper.cpp | 18 | ||||
| -rw-r--r-- | src/modules/options/OptionsWidget_ctcpFloodProtection.cpp | 2 | ||||
| -rw-r--r-- | src/modules/perl/libkviperl.cpp | 60 | ||||
| -rw-r--r-- | src/modules/python/libkvipython.cpp | 54 | ||||
| -rw-r--r-- | src/modules/reguser/libkvireguser.cpp | 4 | ||||
| -rw-r--r-- | src/modules/str/libkvistr.cpp | 5 | ||||
| -rw-r--r-- | src/modules/system/Plugin.cpp | 8 | ||||
| -rw-r--r-- | src/modules/url/libkviurl.cpp | 2 |
14 files changed, 99 insertions, 132 deletions
diff --git a/src/modules/addon/libkviaddon.cpp b/src/modules/addon/libkviaddon.cpp index f32fef1d7..178194283 100644 --- a/src/modules/addon/libkviaddon.cpp +++ b/src/modules/addon/libkviaddon.cpp @@ -599,7 +599,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) Installs the [files] for the addon identified by the specified <id>. These files will be automatically removed when the addon is uninstalled.[br][br] <target> is the target path inside the local KVIrc directory. The following - standard paths should be used:[br] + standard paths should be used: [ul] [li]"pics" for image files.[/li] [li]"locale" for translation *.mo files.[/li] diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index 186fce01c..163e4e86b 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -612,7 +612,7 @@ static bool context_kvs_fnc_queueSize(KviKvsModuleFunctionCall * c) has no associated IRC context) then this function prints a warning and returns an empty string.[br] If the IRC context is not using SSL then this function returns an empty string.[br] Some queries can accept an optional parameter <param1>.[br] - Available query strings are:[br] + Available query strings are: [ul] [li]signatureType[/li] [li]signatureContents[/li] diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp index f130b9048..510c5b122 100644 --- a/src/modules/dcc/libkvidcc.cpp +++ b/src/modules/dcc/libkvidcc.cpp @@ -1370,7 +1370,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) @keyterms: DCC without IRC @body: - [big]What is DCC?[/big][br] + [big]What is DCC?[/big] 'DCC' stands for Direct Client Connection, it is used to exchange data directly between two IRC clients (with no IRC server in the middle).[br] DCC itself is not a well-defined protocol, but rather a set of @@ -1381,9 +1381,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) The [b]DCC negotiation[/b] part is used to request the [b]DCC transfer[/b] and define its necessary parameters,[br] while the [b]DCC transfer[/b] part is the real data transfer between clients.[br] The [b]DCC negotiation[/b] requires a third entity that routes the negotiation data between clients, - this is usually an IRC server.[br] - [br] - [big]DCC Negotiation[/big][br] + this is usually an IRC server. + [big]DCC Negotiation[/big] This part of the protocol is the most tricky and difficult one, and is different for almost every DCC sub-protocol.[br] The [i]constant[/i] scenario of the negotiation is more or less the following:[br] There are two IRC clients connected to the same IRC network and they want to exchange some data in @@ -1436,12 +1435,10 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) You can also manually connect to a specified port and IP address without having been notified of a DCC request.[br][br][br] Is everything clear?...I don't think so... my English is really bad... - [br] - [big]DCC Transfer[/big][br] + [big]DCC Transfer[/big] The DCC transfer part is different for every DCC sub-protocol, but - it always happens over a direct client to client TCP connection.[br] - [br] - [big]DCC Sub-protocols[/big][br] + it always happens over a direct client to client TCP connection. + [big]DCC Sub-protocols[/big] There are two main standardized DCC sub-protocols that are widely implemented in IRC clients: [b]DCC chat[/b] and [b]DCC SEND[/b].[br] DCC chat is quite simple and the protocol is more or less completely defined.[br] @@ -1451,9 +1448,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) by VIrc, the Send-Ahead enhancement implemented in many clients, the RESUME facility...)[br] Many clients introduced new DCC sub-protocols with non-standard implementations, leading again to client incompatibility.[br] - Some of the notable sub-protocols are DCC Voice, DCC Draw, DCC Whiteboard...[br] - [br] - [big]DCC Chat[/big][br] + Some of the notable sub-protocols are DCC Voice, DCC Draw, DCC Whiteboard... + [big]DCC Chat[/big] This is the simplest and most standardized DCC sub-protocol. Almost every IRC client implements it.[br] It is used to exchange lines of text between the two clients.[br] The negotiation is quite simple, we assume that [b]client A[/b] wants to establish a DCC chat connection to [b]client B[/b]. @@ -1479,9 +1475,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]DCC SCHAT chat <ipaddress> <port>[/b][br] where [i]SCHAT[/i] stands for Secure CHAT.[br] The external protocol is exactly the same but is built on top of a Secure Sockets Layer implementation (specifically OpenSSL). The connection will be encrypted with a private key algorithm after - a public key handshake.[br] - [br] - [big]DCC SEND[/big][br] + a public key handshake. + [big]DCC SEND[/big] DCC SEND is another standard sub-protocol. Most clients implement this as well, many have tried to enhance it.[br] The basic DCC SEND protocol allows transferring a file from the requesting client to the receiving client.[br] @@ -1529,9 +1524,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]DCC SSEND <filename> <ipaddress> <port> <filesize>[/b][br] where [i]SSEND[/i] stands for Secure SEND.[br] The [i]Turbo[/i] extension can be combined with the SSL extension too. In this case the second parameter - of the negotiation string must be [i]TSSEND[/i] or [i]STSEND[/i].[br] - [br] - [big]DCC RECV[/big][br] + of the negotiation string must be [i]TSSEND[/i] or [i]STSEND[/i]. + [big]DCC RECV[/big] DCC RECV is the counterpart of DCC SEND. This is a KVIrc extension and is not standard yet.[br] The purpose of this sub-protocol will not be immediately clear, but read on for an explanation.[br] It is used to request a file from another client; we assume that [b]client A[/b] knows that [b]client B[/b] has @@ -1555,9 +1549,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) DCC RECV requires the initiating (passive) client to know that the file to be transferred is available on the B's side and probably also know the file size. This sub-protocol does not specify how this information is obtained, but it will become clear soon that it can be obtained either manually (User B can simply tell the info to User A), - or automatically (as in the DCC RSEND sub-protocol (keep reading)).[br] - [br] - [big]DCC RSend[/big][br] + or automatically (as in the DCC RSEND sub-protocol (keep reading)). + [big]DCC RSend[/big] DCC RSend stands for Reverse Send. This is a KVIrc extension to the SEND protocol to allow firewalled clients to send files.[br] In fact, this is a [i]half[/i] sub-protocol, since it defines only a part of the DCC negotiation; the transfer is defined by another sub-protocol (and specifically bu DCC RECV).[br] @@ -1573,9 +1566,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]DCC TRSEND <filename> <filesize>[/b][br] The [i]SSL[/i] extension is also activated by prepending an [b]S[/b] to the RSEND string. It can be again combined with the [i]Turbo[/i] extension. The negotiation parameter becomes then [i]SRSEND[/i], [i]TSRSEND[/i] or [i]STRSEND[/i].[br] - Easy, no? :)[br] - [br] - [big]DCC Get[/big][br] + Easy, no? :) + [big]DCC Get[/big] This is again a [i]half[/i] sub-protocol in fact since it defines only a part of the negotiation for file transfers.[br] It is also NON standard, since actually no client except KVIrc implements it (AFAIK).[br] DCC Get is used to request a file from a remote client. Assume that [b]client A[/b] wants to request a file from [b]client B[/b] @@ -1592,24 +1584,22 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) is found in the sub-protocol that the remote client will choose.[br] The association of <filename> with a real file on the B's machine is not explicitly defined by the sub-protocol; KVIrc uses an internal [i]file-offer[/i] table with a list of files that are available for download.[br] - The [i]Turbo[/i] and [i]SSL[/i] extensions are activated as usual, [i]TGET[/i], [i]SGET[/i], [i]TSGET[/i] and [i]STGET[/i] are supported.[br] - [br] - [big]DCC File Transfer[/big][br] + The [i]Turbo[/i] and [i]SSL[/i] extensions are activated as usual, [i]TGET[/i], [i]SGET[/i], [i]TSGET[/i] and [i]STGET[/i] are supported. + [big]DCC File Transfer[/big] DCC SEND: Send a file, sender is passive, receiver is active (not good for firewalled senders)[br] DCC RECV: Receive a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC RSEND: Send a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC GGET: Receive a file, sender is passive if not firewalled, receiver active if sender not firewalled (will fail only if both are firewalled)[br] The [i]Turbo[/i] extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC sub-protocol name[br] - The [i]SSL[/i] extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC sub-protocol name[br] - [br] - [big]DCC Voice[/big][br] + The [i]SSL[/i] extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC sub-protocol name + [big]DCC Voice[/big] DCC Voice is a KVIrc extension (there is a Windows client called VIrc that implements such a protocol, but it is incompatible with KVIrc).[br] DCC Voice allows audio level communication between two clients, the audio stream is compressed with a specified codec.[br] KVIrc currently supports the ADPCM (core support) and the GSM codec (if the libgsm is available on the target system).[br] [b]TODO: Finish the DCC Voice doc :)[/b] - [big]More tricks[/big][br] + [big]More tricks[/big] KVIrc supports another [i]hack[/i] to the DCC negotiation, it recognizes [i]XDCC[/i] as a DCC negotiation CTCP parameter.[br] This can be used to circumvent limitations of some IRC clients (read mIRC) that will not allow @@ -2770,7 +2760,7 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) has no associated DCC session) then this function prints a warning and returns an empty string.[br] If the DCC session is not using SSL then this function returns an empty string.[br] Some queries can accept an optional parameter <param1>.[br] - Available query strings are:[br] + Available query strings are: [ul] [li]signatureType[/li] [li]signatureContents[/li] @@ -2903,14 +2893,13 @@ static bool dcc_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c) @title: The DCC module @body: - [big]Overview[/big][br] + [big]Overview[/big] The DCC module handles the Direct Client Connection protocol layer and all it's sub-protocols.[br] The sub-protocols include the standard CHAT the standard SEND and its variants plus several - KVIrc extensions like RECV, RSEND, GET and VOICE.[br] - [br] - [big]Initiating a DCC negotiation[/big][br] + KVIrc extensions like RECV, RSEND, GET and VOICE. + [big]Initiating a DCC negotiation[/big] The following commands initiate a specific DCC session with a remote client:[br] [cmd]dcc.chat[/cmd][br] @@ -2918,9 +2907,8 @@ static bool dcc_kvs_fnc_getSSLCertInfo(KviKvsModuleFunctionCall * c) [cmd]dcc.rsend[/cmd][br] [cmd]dcc.recv[/cmd][br] [cmd]dcc.get[/cmd][br] - [cmd]dcc.voice[/cmd][br] - [br] - [big]Handling the DCC events[/big][br] + [cmd]dcc.voice[/cmd] + [big]Handling the DCC events[/big] Each DCC session has an associated unique identifier (<dcc_id>).[br] You can interact with the session by using several commands and functions exported by this module and by passing the above session diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp index 10fd12f3d..49dc95a42 100644 --- a/src/modules/dialog/libkvidialog.cpp +++ b/src/modules/dialog/libkvidialog.cpp @@ -875,7 +875,7 @@ static bool dialog_kvs_fnc_yesno(KviKvsModuleFunctionCall * c) is open the whole world can change: you can return from the dialog call and discover that the server connection no longer exists and the application is about to quit.[br] This may happen even with non-blocking dialogs,but in non-blocking mode you have - a way to handle this event. Consider the following snippet of code:[br] + a way to handle this event. Consider the following snippet of code: [example] echo My name is $? [/example] diff --git a/src/modules/objects/KvsObject_lineEdit.cpp b/src/modules/objects/KvsObject_lineEdit.cpp index db302cc8c..8af1498ce 100644 --- a/src/modules/objects/KvsObject_lineEdit.cpp +++ b/src/modules/objects/KvsObject_lineEdit.cpp @@ -133,14 +133,14 @@ static const int mode_cod[] = { Sets the lineedit to read-only mode. !fn: $setInputMask(<mask:string>) Sets the validation input mask to inputMask.[br] - [b]Example:[/b][br] + [b]Example:[/b] [example] %ledit_example->$setInputMask( "+99 99 99 99 99;_" );[br] %ledit_example->$setInputMask( "000.000.000.000;_" );[br] %ledit_example->IP Number Mask.[br] %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); [/example] - The mask format understands these mask characters:[br] + The mask format understands these mask characters: [example] [b][comment]Character Meaning[/comment][/b][br] A - ASCII alphabetic character required. A-Z, a-z.[br] diff --git a/src/modules/objects/KvsObject_multiLineEdit.cpp b/src/modules/objects/KvsObject_multiLineEdit.cpp index 955091b6d..19ddb0f84 100644 --- a/src/modules/objects/KvsObject_multiLineEdit.cpp +++ b/src/modules/objects/KvsObject_multiLineEdit.cpp @@ -70,7 +70,7 @@ Returns [b]1[/b] (true) if the cursor is placed at the end of the text; otherwise returns [b]0[/b] (false). !fn: $setWordWrap(<wrap_mode:string>) Sets the word wrap mode to mode.[br] - Valid Values are:[br] + Valid Values are: [example] - NoWrap - Do not wrap the text.[br] - WidgetWidth - Wrap the text at the current width of the widget.[br] diff --git a/src/modules/objects/KvsObject_wrapper.cpp b/src/modules/objects/KvsObject_wrapper.cpp index 147ca7d4e..1131aa4c2 100644 --- a/src/modules/objects/KvsObject_wrapper.cpp +++ b/src/modules/objects/KvsObject_wrapper.cpp @@ -80,7 +80,7 @@ As you can see the objects are identified by their names (for example "mdi_manager") and by their class names (for example KviChannelWindow).[br] To wrap a specific widget you must provide a path in the tree composed of search specifiers.[br] - Each search specifier can have one of the following forms:[br] + Each search specifier can have one of the following forms: [example] (1) <class> (2) <class>::<name> @@ -91,17 +91,17 @@ The first three forms may be preceded by the prefix [b]*[/b] which will tell KVS to perform a recursive search from this point. Let's see some examples.[br] The form (1) matches the first widget with the specified class name.[br] - For instance:[br] + For instance: [example] %Frame = $new(wrapper,0,test,KviMainWindow) [/example] This will wrap the first top level object with class KviMainWindow. Now you can use - any [class]widget[/class] or [class]object[/class] methods on it.[br] + any [class]widget[/class] or [class]object[/class] methods on it. [example] %Frame = $new(wrapper,0,test,KviMainWindow) %Frame->$setGeometry(20,20,400,400); [/example] - If you want to wrap the KVIrc status bar you can use a composite path:[br] + If you want to wrap the KVIrc status bar you can use a composite path: [example] %StatusBar = $new(wrapper,0,test,KviMainWindow,KviStatusBar) %StatusBar->$setProperty(autoFillBackground,1) @@ -109,7 +109,7 @@ [/example] The form (2) matches both the class and the widget name. In this way you can differentiate between children that have the same class.[br] - For instance:[br] + For instance: [example] %VerticalScrollBar = $new(wrapper,0,test,KviMainWindow,QSplitter,KviWindowStack,QWidget::qt_scrollarea_vcontainer,QScrollBar) %VerticalScrollBar->$setProperty(invertedAppearance,1); @@ -124,24 +124,24 @@ [/example] If you don't want to specify the full path to the widget you can try to use a recursive search which may skip some levels. Keep in mind that the recursive search is breadth-first and will return the first widget that matches.[br] - In our sample tree the following would match the first widget with class KviChannelWindow.[br] + In our sample tree the following would match the first widget with class KviChannelWindow. [example] %Chan = $new(wrapper,0,test,*KviChannelWindow) %Chan->$setBackgroundColor(80,0,0); [/example] - The following would match the first widget with name #kvirc[br] + The following would match the first widget with name #kvirc [example] %Chan = $new(wrapper,0,test,*::#kvirc) %Chan->$setBackgroundColor(80,0,0); [/example] The recursive search can start at any level, so if starting from the root does not work properly you might try - specifying a part of the path and then searching recursively.[br] + specifying a part of the path and then searching recursively. [example] %Chan = $new(wrapper,0,test,KviMainWindow,*::#kvirc) %Chan->$setBackgroundColor(80,0,0); [/example] The form (4) allows you to jump directly to a specific KVIrc channel/query/console window, - without the need of looking it up in the tree.[br] + without the need of looking it up in the tree. [example] %Win = $new(wrapper,0,test,!Window::$window) %Win->$setBackgroundColor(80,0,0); diff --git a/src/modules/options/OptionsWidget_ctcpFloodProtection.cpp b/src/modules/options/OptionsWidget_ctcpFloodProtection.cpp index 8f625c57a..07a12c43e 100644 --- a/src/modules/options/OptionsWidget_ctcpFloodProtection.cpp +++ b/src/modules/options/OptionsWidget_ctcpFloodProtection.cpp @@ -33,7 +33,7 @@ /* @doc: ctcpfloodprotectionoptions @type: - widget + generic @title: CTCP flood protection options @short: diff --git a/src/modules/perl/libkviperl.cpp b/src/modules/perl/libkviperl.cpp index 2284e7214..d84e1c848 100644 --- a/src/modules/perl/libkviperl.cpp +++ b/src/modules/perl/libkviperl.cpp @@ -71,13 +71,12 @@ static KviModule * g_pPerlCoreModule = nullptr; @short: How to use Perl from KVS and KVS from Perl. @body: - [big]Introduction[/big][br] + [big]Introduction[/big] Starting from version 3.0.2 you can include Perl code snippets in KVS code and you can use KVS commands from within Perl. This feature is present only if a working Perl installation - has been found at build time.[br] - [br] - [big]Using Perl from KVS[/big][br] + has been found at build time. + [big]Using Perl from KVS[/big] Using Perl from KVIrc is really easy - just enclose your Perl code snippet inside [cmd]perl.begin[/cmd] and [cmd]perl.end[/cmd]. [example] @@ -85,7 +84,7 @@ static KviModule * g_pPerlCoreModule = nullptr; <perl code goes here> [cmd]perl.end[/cmd] [/example] - For example:[br] + For example: [example] [cmd]perl.begin[/cmd] open(MYFILE,'>>myfile.txt') or die "Can't open myfile.txt!"; @@ -98,9 +97,8 @@ static KviModule * g_pPerlCoreModule = nullptr; and [cmd]perl.end[/cmd]. This means that you can write Perl code in the commandline, in the aliases, the event handlers, popups...anywhere.[br] If you have already encountered KVIrc's [cmd]eval[/cmd] command - then you probably also know how to execute a Perl code snippet from a file :)[br] - [br] - [big]Using KVS from Perl[/big][br] + then you probably also know how to execute a Perl code snippet from a file :) + [big]Using KVS from Perl[/big] KVIrc exports several commands to the Perl namespace that allow you to invoke KVIrc's functions from inside the Perl code snippet.[br] The nicest example is KVIrc::echo(): @@ -115,9 +113,8 @@ static KviModule * g_pPerlCoreModule = nullptr; <text> is obviously the text to be printed. <colorset> is the equivalent of the [cmd]echo[/cmd] -i option and <windowid> is the equivalent of the -w option. Both <colorset> and <windowid> - can be omitted (in this case KVIrc will use a default colorset and the current window).[br] - [br] - [big]Perl execution contexts[/big][br] + can be omitted (in this case KVIrc will use a default colorset and the current window). + [big]Perl execution contexts[/big] The Perl code snippets are executed by a Perl interpreter - each interpreter has its own context and thus its own variables, own function namespace etc.[br] @@ -128,7 +125,7 @@ static KviModule * g_pPerlCoreModule = nullptr; allow you to preserve your context across [cmd]perl.begin[/cmd] invocations.[br] [br] You can invoke a specific Perl context by passing it as parameter to the [cmd]perl.begin[/cmd] - command:[br] + command: [example] [cmd]perl.begin("mycontext")[/cmd] $myvariable = "mycontext"; @@ -136,7 +133,7 @@ static KviModule * g_pPerlCoreModule = nullptr; [cmd]perl.end[/cmd] [/example] The nice thing is that at a later time you can invoke this context again - and discover that $mycontext has preserved its value:[br] + and discover that $mycontext has preserved its value: [example] [cmd]perl.begin("mycontext")[/cmd] KVIrc::echo("myvariable is still equal to ".$myvariable); @@ -167,23 +164,21 @@ static KviModule * g_pPerlCoreModule = nullptr; once in a while to recreate the interpreter.[br] If you just execute occasional Perl code snippets and don't need to keep persistent variables, then just use the nameless temporary context provided - by [cmd]perl.begin[/cmd]("").[br] - [br] - [big]Passing parameters to the Perl script[/big][br] + by [cmd]perl.begin[/cmd](""). + [big]Passing parameters to the Perl script[/big] The easiest way to pass parameters to the perl code snippet is to put them as [cmd]perl.begin[/cmd] arguments. In fact the complete syntax of [cmd]perl.begin[/cmd] is:[br] [b]perl.begin(<perl context>,<arg0>,<arg1>,...)[/b][br] Where the <arg0>,<arg1>...<argN> parameters - are passed to the Perl context as elements of the $_[] array.[br] + are passed to the Perl context as elements of the $_[] array. [example] [cmd]perl.begin[/cmd]("","Hello world!","Now I CAN",1,2,3) for($i=0;$i<5;$i++) KVIrc::echo($_[i],40); [cmd]perl.end[/cmd] [/example] - [br] - [big]Accessing the KVIrc scripting context from Perl[/big][br] + [big]Accessing the KVIrc scripting context from Perl[/big] KVIrc exposes the following functions that manipulate variables of the KVIrc's current KVS execution context:[br] [b]KVIrc::getLocal(<x>)[/b][br] @@ -195,7 +190,7 @@ static KviModule * g_pPerlCoreModule = nullptr; [b]KVIrc::setGlobal(<Y>,<value>)[/b][br] Sets KVIrc's global variable %Y to <value>[br] The local variables referenced belong to the current KVS execution context - while the global variables are visible everywhere.[br] + while the global variables are visible everywhere. [example] %pippo = test %Pluto = 12345 @@ -210,13 +205,12 @@ static KviModule * g_pPerlCoreModule = nullptr; [cmd]echo[/cmd] "\%pippo is" %pippo [cmd]echo[/cmd] "\%Pluto is" %Pluto [/example] - [br] - [big]Executing arbitrary KVIrc commands from Perl[/big][br] + [big]Executing arbitrary KVIrc commands from Perl[/big] You can execute arbitrary KVS commands from Perl by means of:[br] [b]KVIrc::eval(<code>)[/b][br] This function behaves exactly like the ${ <code> } KVS construct - it executes <code> in a child context and returns its evaluation result.[br] - The following two code snippets have equivalent visible effects:[br] + The following two code snippets have equivalent visible effects: [example] [cmd]echo[/cmd] ${ return "Yeah!"; } [/example] @@ -228,7 +222,7 @@ static KviModule * g_pPerlCoreModule = nullptr; You can [i]eval[/i] compound command sequences and variable ones.[br] Remember that the Perl code snippet is evaluated in a child KVS context and thus the local variables are NOT visible! - The following code snippets may easily fool you:[br] + The following code snippets may easily fool you: [example] %x = 10 [cmd]perl.begin[/cmd] @@ -236,7 +230,7 @@ static KviModule * g_pPerlCoreModule = nullptr; [cmd]perl.end[/cmd] [/example] This will print [i]The value is[/i] since %x is not accessible from the eval's context. - If you have tried to write something like this then you probably need to rewrite it as:[br] + If you have tried to write something like this then you probably need to rewrite it as: [example] %x = 10 [cmd]perl.begin[/cmd] @@ -257,7 +251,7 @@ static KviModule * g_pPerlCoreModule = nullptr; KVIrc::echo(KVIrc::eval('return $window.caption')); [cmd]perl.end[/cmd] [/example] - [big]A shortcut for KVIrc::eval("/say...")[/big][br] + [big]A shortcut for KVIrc::eval("/say...")[/big] Since KVIrc::eval("/say...") is a common calling pattern, say has been added to the KVIrc Perl namespace. You can now call [example] @@ -270,8 +264,7 @@ static KviModule * g_pPerlCoreModule = nullptr; The complete syntax for KVIrc::say() is:[br] [b]KVIrc::say(<text>[,<windowid>])[/b][br] and the semantics are obvious (see also /[cmd]say[/cmd]). - [br] - [big]Perl script return values[/big][br] + [big]Perl script return values[/big] The [cmd]perl.begin[/cmd] command propagates the Perl code return value to the KVIrc context (just like a [cmd]setreturn[/cmd]() would do) - this makes it easier to create an alias that executes a Perl script and @@ -284,8 +277,7 @@ static KviModule * g_pPerlCoreModule = nullptr; [li]Then, from the KVIrc script after [cmd]perl.end[/cmd], retrieve the %var variable, check its value and call [cmd]setreturn[/cmd]() on it.[/li] [/ul] - [br] - [big]Executing Perl scripts from files[/big][br] + [big]Executing Perl scripts from files[/big] [example] [cmd]alias[/cmd](perlexec) { @@ -298,13 +290,12 @@ static KviModule * g_pPerlCoreModule = nullptr; [comment]# or even[/comment] [cmd]echo[/cmd] $perlexec("/home/pragma/computeprimelargerthan.pl","10000") [/example] - [br] - [big]Other tricks[/big][br] + [big]Other tricks[/big] An interesting feature of persistent Perl contexts is that you can prepare a context for later fast execution.[br] The idea is to declare all Perl functions in a single Perl code snippet then call single functions when fast execution is needed.[br] - For example you might parse the following snippet at KVIrc's startup:[br] + For example you might parse the following snippet at KVIrc's startup: [example] [cmd]perl.begin[/cmd]("persistent") sub handler_for_event_1 @@ -323,8 +314,7 @@ static KviModule * g_pPerlCoreModule = nullptr; handler_for_event_1($_[0],$_[1]) [cmd]perl.end[/cmd] [/example] - [br] - [big]Curiosity[/big][br] + [big]Curiosity[/big] The Perl support in KVIrc is implemented as a master-slave module pair. The perl.* module is the master while perlcore is the slave. When Perl support isn't compiled in, the perl.* commands diff --git a/src/modules/python/libkvipython.cpp b/src/modules/python/libkvipython.cpp index 0af0eec34..6bdd56a80 100644 --- a/src/modules/python/libkvipython.cpp +++ b/src/modules/python/libkvipython.cpp @@ -68,7 +68,7 @@ static KviModule * g_pPythonCoreModule = nullptr; @short: How to use Python from KVS and KVS from Python. @body: - [big]Introduction[/big][br] + [big]Introduction[/big] Starting from version 4.0.0 you can include Python code snippets in KVS code and you can use KVS commands from within Python. This feature is present only if a working Python installation @@ -76,8 +76,7 @@ static KviModule * g_pPythonCoreModule = nullptr; The Python support is very similar to the Perl support present since 3.x, so if you have used Perl from KVIrc before you'll find the API is almost the same.. otherwise read on :) - [br] - [big]Using Python from KVS[/big][br] + [big]Using Python from KVS[/big] Using Python from KVIrc is really easy - just enclose your Python code snippet inside [cmd]python.begin[/cmd] and [cmd]python.end[/cmd]. [example] @@ -85,7 +84,7 @@ static KviModule * g_pPythonCoreModule = nullptr; <python code goes here> [cmd]python.end[/cmd] [/example] - For example:[br] + For example: [example] [cmd]python.begin[/cmd] f = open('myfile.txt', 'w') @@ -98,9 +97,8 @@ static KviModule * g_pPythonCoreModule = nullptr; and [cmd]python.end[/cmd]. This means that you can write Python code in the commandline, in the aliases, the event handlers, popups... anywhere.[br] If you have already encountered KVIrc's [cmd]eval[/cmd] command - then you probably also know how to execute a Python code snippet from a file :)[br] - [br] - [big]Using KVS from python[/big][br] + then you probably also know how to execute a Python code snippet from a file :) + [big]Using KVS from python[/big] KVIrc exports several commands to the Python namespace that allow you to invoke KVIrc's functions from inside the Python code snippet.[br] The nicest example is kvirc.echo(): @@ -115,9 +113,8 @@ static KviModule * g_pPythonCoreModule = nullptr; <text> is obviously the text to be printed. <colorset> is the equivalent of the [cmd]echo[/cmd] -i option and <windowid> is the equivalent of the -w option. Both <colorset> and <windowid> - can be omitted (in this case KVIrc will use a default colorset and the current window).[br] - [br] - [big]Python execution contexts[/big][br] + can be omitted (in this case KVIrc will use a default colorset and the current window). + [big]Python execution contexts[/big] The Python code snippets are executed by a Python interpreter - each interpreter has its own context and thus its own variables, own function namespace etc.[br] @@ -128,7 +125,7 @@ static KviModule * g_pPythonCoreModule = nullptr; allow you to preserve your context across [cmd]python.begin[/cmd] invocations.[br] [br] You can invoke a specific Python context by passing it as parameter to the [cmd]python.begin[/cmd] - command:[br] + command: [example] [cmd]python.begin("mycontext")[/cmd] myvariable = "mycontext" @@ -136,7 +133,7 @@ static KviModule * g_pPythonCoreModule = nullptr; [cmd]python.end[/cmd] [/example] The nice thing is that at a later time you can invoke this context again - and discover that mycontext has preserved its value:[br] + and discover that mycontext has preserved its value: [example] [cmd]python.begin("mycontext")[/cmd] kvirc.echo("myvariable is still equal to " + myvariable) @@ -167,23 +164,21 @@ static KviModule * g_pPythonCoreModule = nullptr; once in a while to recreate the interpreter.[br] If you just execute occasional Python code snippets and don't need to keep persistent variables, then just use the nameless temporary context provided - by [cmd]python.begin[/cmd]("").[br] - [br] - [big]Passing parameters to the Python script[/big][br] + by [cmd]python.begin[/cmd](""). + [big]Passing parameters to the Python script[/big] The easiest way to pass parameters to the Python code snippet is to put them as [cmd]python.begin[/cmd] arguments. In fact the complete syntax of [cmd]python.begin[/cmd] is:[br] [b]python.begin(<python context>,<arg0>,<arg1>,...)[/b][br] Where the <arg0>,<arg1>...<argN> parameters - are passed to the Python context as elements of the aArgs array.[br] + are passed to the Python context as elements of the aArgs array. [example] [cmd]python.begin[/cmd]("","Hello world!","Now I CAN",1,2,3) for l in range(0,5): kvirc.echo(aArgs[l]) [cmd]python.end[/cmd] [/example] - [br] - [big]Accessing the KVIrc scripting context from python[/big][br] + [big]Accessing the KVIrc scripting context from python[/big] KVIrc exposes the following functions that manipulate variables of KVIrc's current KVS execution context:[br] [b]kvirc.getLocal(<x>)[/b][br] @@ -195,7 +190,7 @@ static KviModule * g_pPythonCoreModule = nullptr; [b]kvirc.setGlobal(<Y>,<value>)[/b][br] Sets KVIrc's global variable %Y to <value>[br] The local variables referenced belong to the current KVS execution context - while the global variables are visible everywhere.[br] + while the global variables are visible everywhere. [example] %pippo = test %Pluto = 12345 @@ -210,13 +205,12 @@ static KviModule * g_pPythonCoreModule = nullptr; [cmd]echo[/cmd] "\%pippo is" %pippo [cmd]echo[/cmd] "\%Pluto is" %Pluto [/example] - [br] - [big]Executing arbitrary KVIrc commands from python[/big][br] + [big]Executing arbitrary KVIrc commands from python[/big] You can execute arbitrary KVS commands from Python by means of:[br] [b]kvirc.eval(<code>)[/b][br] This function behaves exactly like the ${ <code> } KVS construct - it executes <code> in a child context and returns its evaluation result.[br] - The following two code snippets have equivalent visible effects:[br] + The following two code snippets have equivalent visible effects: [example] [cmd]echo[/cmd] ${ return "Yeah!"; } [/example] @@ -228,7 +222,7 @@ static KviModule * g_pPythonCoreModule = nullptr; You can "eval" compound command sequences and variable ones.[br] Remember that the Python code snippet is evaluated in a child KVS context and thus the local variables are NOT visible! - The following code snippets may easily fool you:[br] + The following code snippets may easily fool you: [example] %x = 10 [cmd]python.begin[/cmd] @@ -236,7 +230,7 @@ static KviModule * g_pPythonCoreModule = nullptr; [cmd]python.end[/cmd] [/example] This will print "The value is " since %x is not accessible from the eval's context. - If you have tried to write something like this then you probably need to rewrite it as:[br] + If you have tried to write something like this then you probably need to rewrite it as: [example] %x = 10 [cmd]python.begin[/cmd] @@ -244,8 +238,7 @@ static KviModule * g_pPythonCoreModule = nullptr; kvirc.eval("echo \"The value is ".$x."\"") [cmd]python.end[/cmd] [/example] - [br] - [big]A shortcut for kvirc.eval("/say...")[/big][br] + [big]A shortcut for kvirc.eval("/say...")[/big] Since kvirc.eval("/say...") is a common calling pattern, say has been added to the KVIrc Python namespace. You can now call [example] @@ -258,8 +251,7 @@ static KviModule * g_pPythonCoreModule = nullptr; The complete syntax for kvirc.say() is:[br] [b]kvirc.say(<text>[,<windowid>])[/b][br] and the semantics are obvious (see also /[cmd]say[/cmd]). - [br] - [big]Python script return values[/big][br] + [big]Python script return values[/big] The [cmd]python.begin[/cmd] command propagates the Python code return value to the KVIrc context (just like a [cmd]setreturn[/cmd]() would do) - this makes it easier to create an alias that executes a Python script and @@ -272,8 +264,7 @@ static KviModule * g_pPythonCoreModule = nullptr; [li]Then, from the KVIrc script after [cmd]python.end[/cmd], retrieve the %var variable, check its value and call [cmd]setreturn[/cmd]() on it.[/li] [/ul] - [br] - [big]Executing Python scripts from files[/big][br] + [big]Executing Python scripts from files[/big] [example] [cmd]alias[/cmd](pythonexec) { @@ -286,8 +277,7 @@ static KviModule * g_pPythonCoreModule = nullptr; [comment]# or even[/comment] [cmd]echo[/cmd] $pythonexec("/home/pragma/computeprimelargerthan.pl","10000") [/example] - [br] - [big]Curiosity[/big][br] + [big]Curiosity[/big] The Python support in KVIrc is implemented as a master-slave module pair. The python.* module is the master while pythoncore is the slave. When Python support isn't compiled in, the python.* commands diff --git a/src/modules/reguser/libkvireguser.cpp b/src/modules/reguser/libkvireguser.cpp index 3d51faab9..ebb9d6abb 100644 --- a/src/modules/reguser/libkvireguser.cpp +++ b/src/modules/reguser/libkvireguser.cpp @@ -1087,11 +1087,11 @@ static bool reguser_kvs_fnc_property(KviKvsModuleFunctionCall * c) bound to the first entry matched by by <user_mask>.[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 - and does not print any error.[br] + and does not print any error. [example] %property = $reguser.matchProperty(<user_mask>,<property_name>) [/example] - Is actually a shortcut for:[br] + Is actually a shortcut for: [example] %tmp = [fnc]$reguser.match[/fnc](<user_mask>) if("%tmp" != "")%property = $reguser.property(%tmp,<property_name>) diff --git a/src/modules/str/libkvistr.cpp b/src/modules/str/libkvistr.cpp index a0a4e961c..c695be123 100644 --- a/src/modules/str/libkvistr.cpp +++ b/src/modules/str/libkvistr.cpp @@ -1697,7 +1697,7 @@ static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) %Test[] = $str.split("Y*H","hihiYeaHhohohoyeahYepYEAHhi",sw) echo %Test[] [/example] - If used outside of an array context, a comma-separated list of substrings is returned:[br] + If used outside of an array context, a comma-separated list of substrings is returned: [example] [cmd]echo[/cmd] $str.split("[ ]*","Condense spaces and change all it in commas",r) [/example] @@ -1879,8 +1879,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) and by using the following corresponding variadic parameters. Since the percent sign is used as variable prefix in KVIrc, this function uses the question mark [b]?[/b] instead.[br] - The <format> string can contain the following escape sequences:[br] - [br] + The <format> string can contain the following escape sequences: [table] [tr][td][b]?s[/b][/td][td]The next parameter is evaluated as a string and substituted in place of ?s[/td][/tr] [tr][td][b]?d[/b][/td][td]The next parameter is evaluated as a signed integer and substituted in place of ?d[/td][/tr] diff --git a/src/modules/system/Plugin.cpp b/src/modules/system/Plugin.cpp index f63d3dfa9..33bb6c253 100644 --- a/src/modules/system/Plugin.cpp +++ b/src/modules/system/Plugin.cpp @@ -51,7 +51,7 @@ [br][br] [b]Exported functions by easyplugin (C/C++-Examples):[/b][br] [b]_free function[/b] [i] (needed)[/i][br][br] - This function is important! Since KVIrc can not free directly the memory of the dll, the plugins need the _free function so that the memory can be freed by the plugin to prevent memory-leaks.[br] + This function is important! Since KVIrc can not free directly the memory of the dll, the plugins need the _free function so that the memory can be freed by the plugin to prevent memory-leaks. [example] int _free(void * p) { @@ -70,7 +70,7 @@ [/example] [b]_unload function[/b] [i]((optional)[/i][br][br] This function will be called before the plugins is unloaded. In this function you can clean up memory or other things. - After this call there is no guarantee that the plugin will be kept in memory.[br] + After this call there is no guarantee that the plugin will be kept in memory. [example] int _unload() { @@ -80,7 +80,7 @@ [br][b]_canunload function[/b] [i](optional)[/i][br] The _canunload-function will be called by KVIrc to check if it may unload the plugin. If return value is true KVIrc will unload the plugin, false means he will try unloading it at the next check.[br] - Important: KVIrc will ignore this if unload of plugins will be forced! So you have to be sure that the _unload function of your plugins cleans up![br] + Important: KVIrc will ignore this if unload of plugins will be forced! So you have to be sure that the _unload function of your plugins cleans up! [example] int _canunload() { @@ -90,7 +90,7 @@ [br][b]user function[/b][br] This is the general structure of a user function call.[br] The important thing here is the handling of return values. To return a value to KVIrc you have to allocate memory and write the pointer to it into pBuffer.[br] - Have a look at the example for more details.[br] + Have a look at the example for more details. [example] int about(int argc, char * argv[], char ** pBuffer) { diff --git a/src/modules/url/libkviurl.cpp b/src/modules/url/libkviurl.cpp index 4a3640639..279c414cd 100644 --- a/src/modules/url/libkviurl.cpp +++ b/src/modules/url/libkviurl.cpp @@ -675,7 +675,7 @@ UrlDlgList * findFrame() @description: This command opens a configuration window where it is possible to setup plugin's parameters.[br] - You can also open this window by using popup menu in the URL list window[br] + You can also open this window by using popup menu in the URL list window [big]Configure dialog options:[/big] There is also a ban list widget, which allows to have a list of words that plugin must not catch.[br][br] [i]e.g. if the word "ftp" is inserted in the ban list and if in a window there is an output like "ftp.kvirc.net", |
