| View previous topic :: View next topic |
| Author |
Message |
Dizzle Op
Joined: 28 Apr 2005 Posts: 109
|
Posted: Mon Apr 07, 2008 1:23 pm Post subject: set cmd using in another proc |
|
|
Sry for asking proberly a simple question, butt i have been looking through some scripts. And i really cant find it.
So i would like too ask you guys for some advice!
My problem is :
When i use a "set" commando like this
Code:
| Code: |
proc pub:connect {event} {
global servhost botlogin botpass vhost
putquick "PRIVMSG $servhost :AUTH $botlogin $botpass"
set qauthed 1
if {$vhost} {
putquick "MODE $::botnick +x"
}
}
|
And i like too recall "qauthed" in another proc. Butt i really dont know how!
Thx for helpig _________________ What's this real life ppl keep talking about ??? And where can I download it ??? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Mon Apr 07, 2008 4:50 pm Post subject: |
|
|
You have to declare qauthed global. For example
| Code: | proc pub:connect {event} {
global servhost botlogin botpass vhost
global qauthed ;# this makes qauthed global and usable in other procs
putquick "PRIVMSG $servhost :AUTH $botlogin $botpass"
set qauthed 1
if {$vhost} {
putquick "MODE $::botnick +x"
}
}
proc example {} {
global qauthed
# you can get the value of $qauthed here
} |
_________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
|