| View previous topic :: View next topic |
| Author |
Message |
vigilant Halfop
Joined: 05 Jan 2006 Posts: 48
|
Posted: Mon Sep 03, 2007 2:15 pm Post subject: The ! character |
|
|
What does it mean when you do {![command]}
And where can i read more about these?  _________________ Anser Quraishi
Website: http://www.anserq.com |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Sep 03, 2007 3:57 pm Post subject: |
|
|
| Presumably it means someone is trying to exploit your bot by using tcl special chars in a command attempt.. |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Sep 03, 2007 4:18 pm Post subject: |
|
|
if you mean inside an if statement, ! means if it failed.
| Code: | if {[command]} { # [command] returned 1 } else { [command] returned 0 }
if {![command]} { # [command] returned 0 } else { [command returned 1 }
|
very rough example. _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Sep 03, 2007 8:35 pm Post subject: Re: The ! character |
|
|
| vigilant wrote: | What does it mean when you do {![command]}
And where can i read more about these?  |
Tcl Developer Site could be a good place to start.
Your example isn't complete as the logical NOT is used within a conditional statement.
Simply put (your example) means:
| Code: | if {NOT [command]} {
then do something
} |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
vigilant Halfop
Joined: 05 Jan 2006 Posts: 48
|
Posted: Mon Sep 03, 2007 11:04 pm Post subject: |
|
|
Thanks a lot  _________________ Anser Quraishi
Website: http://www.anserq.com |
|
| Back to top |
|
 |
|