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 

Need help with lag.tcl

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
irq
Voice


Joined: 14 Aug 2010
Posts: 3

PostPosted: Sat Aug 14, 2010 2:16 pm    Post subject: Need help with lag.tcl Reply with quote

Code:
### Configuration
#####################

## trigger
########
set lagtrigger "!lag"

## rights
########
set lagrights "n|-"






####################################################
######################## CODE #####################
##################################################
bind pub ${lagrights} ${lagtrigger} pub:lag:check
bind raw - 391 raw:check:lag
proc pub:lag:check {nick host hand chan test} {
      set ::lag "[clock clicks]";set ::lagchan $chan
      putquick "TIME"
   }
proc raw:check:lag {from key text} {
   putmsg $::lagchan "\273\273 Current Networklag: [expr (([clock clicks] - $::lag)/2)/1000.] ms"
   unset ::lagchan;unset ::lag
}

putlog "\037- Lagcheck by Mettwurst loaded (v1.8)-\037"



When I type !lag, I get this error from eggdrop : Tcl error [raw:check:lag]: invalid command name "putmsg"
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Sat Aug 14, 2010 2:27 pm    Post subject: Reply with quote

Sounds like you don't have the alltools.tcl script loaded. It provides the putmsg command in addition to several others. Here it is though, in case you were curious:

Code:
proc putmsg {dest text} {
  putserv "PRIVMSG $dest :$text"
}


Should work if you load that by itself. Smile


Last edited by Luminous on Sat Aug 14, 2010 2:42 pm; edited 2 times in total
Back to top
View user's profile Send private message
irq
Voice


Joined: 14 Aug 2010
Posts: 3

PostPosted: Sat Aug 14, 2010 2:40 pm    Post subject: Reply with quote

Luminous wrote:
Sounds like you don't have the alltools.tcl script loaded. It provides the putmsg command in addition to several others. Here it is though, in case you were curious:

Code:
proc putmsg {chan text} {
  putserv "PRIVMSG $chan :blah blah blah"
}


Should work if you load that by itself. Smile


Thx Luminous !!!! It worked Wink
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Sat Aug 14, 2010 2:42 pm    Post subject: Reply with quote

You're welcome. Smile However, I screwed a bit, my apologies. >.< I was in a rush and doing that based on memory... change the occurrences of "chan" in that script to "dest". I will edit this above for you to see as well. Smile I also went ahead and put the $text var in the proper place.
Back to top
View user's profile Send private message
irq
Voice


Joined: 14 Aug 2010
Posts: 3

PostPosted: Sat Aug 14, 2010 2:45 pm    Post subject: Reply with quote

Luminous wrote:
You're welcome. Smile However, I screwed a bit, my apologies. >.< I was in a rush and doing that based on memory... change the occurrences of "chan" in that script to "dest". I will edit this above for you to see as well. Smile I also went ahead and put the $text var in the proper place.



I just loaded alltools.tcl and it solved my trouble Very Happy
Back to top
View user's profile Send private message
Luminous
Op


Joined: 12 Feb 2010
Posts: 146

PostPosted: Sat Aug 14, 2010 3:24 pm    Post subject: Reply with quote

Ah, okay, was wondering how that worked without conflict, haha. Yeah, alltools will save you trouble, that was just meant as a temp fix and to give you an idea of what it actually did. Alltools has other useful commands I use often too, be sure to look through it. Smile
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases 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