aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Szymon Tomasz Stefanek2010-10-10 04:17:59 +0000
committerGravatar Szymon Tomasz Stefanek2010-10-10 04:17:59 +0000
commitdf0a20b3f3c816ecd12188fa3495f29baf9aa7cc (patch)
tree491894355a7d7cad5732d4cd6f553f324b24784d
parentImprove the eval documentation (diff)
downloadKVIrc-df0a20b3f3c816ecd12188fa3495f29baf9aa7cc.tar.gz
KVIrc-df0a20b3f3c816ecd12188fa3495f29baf9aa7cc.tar.bz2
KVIrc-df0a20b3f3c816ecd12188fa3495f29baf9aa7cc.zip
The two examples were a bit misleading, need to think of better ones.
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5054 17fca916-40b9-46aa-a4ea-0a15b648b75c
-rw-r--r--src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
index 633771fc3..d94f19626 100644
--- a/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
+++ b/src/kvirc/kvs/kvi_kvs_coresimplecommands_af.cpp
@@ -1358,7 +1358,7 @@ namespace KviKvsCoreSimpleCommands
try to eval the string built by concatenating "echo" and the result of [fnc]$channel.name[/fnc]
inside a channel named "#test;quit" (yes, that's a valid channel name) you'll obtain
a disconnection as a side effect. To avoid this you need to use [fnc]$escape[/fnc]() around
- [fnc]$channel.name[/fnc]. See the examples below.
+ [fnc]$channel.name[/fnc].
@examples:
[example]
[comment]# evaluate a variable command[/comment]
@@ -1388,18 +1388,6 @@ namespace KviKvsCoreSimpleCommands
[comment]# Evaluate a command block[/comment]
eval "{ echo First command!; echo Second command!; }"
[/example]
- [example]
- [comment]# Non properly sanitized event handler (will quit on channel #test;quit)[/comment]
- [cmd]event[/cmd](OnChannelSync,non_sane)
- {
- eval "echo $channel.name sync'd in $0 msecs";
- }
- [comment]# Properly sanitized event handler (will properly print the sync time)[/comment]
- [cmd]event[/cmd](OnChannelSync,sane)
- {
- eval "echo $escape($channel.name) sync'd in $0 msecs";
- }
- [/example]
@seealso:
[fnc]$escape[/fnc]
*/