egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

set cmd using in another proc

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Dizzle
Op


Joined: 28 Apr 2005
Posts: 109

PostPosted: Mon Apr 07, 2008 1:23 pm    Post subject: set cmd using in another proc Reply with quote

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
View user's profile Send private message Visit poster's website MSN Messenger
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Mon Apr 07, 2008 4:50 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber