| View previous topic :: View next topic |
| Author |
Message |
irq Voice
Joined: 14 Aug 2010 Posts: 3
|
Posted: Sat Aug 14, 2010 2:16 pm Post subject: Need help with lag.tcl |
|
|
| 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 |
|
 |
Luminous Op
Joined: 12 Feb 2010 Posts: 146
|
Posted: Sat Aug 14, 2010 2:27 pm Post subject: |
|
|
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. 
Last edited by Luminous on Sat Aug 14, 2010 2:42 pm; edited 2 times in total |
|
| Back to top |
|
 |
irq Voice
Joined: 14 Aug 2010 Posts: 3
|
Posted: Sat Aug 14, 2010 2:40 pm Post subject: |
|
|
| 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.  |
Thx Luminous !!!! It worked  |
|
| Back to top |
|
 |
Luminous Op
Joined: 12 Feb 2010 Posts: 146
|
Posted: Sat Aug 14, 2010 2:42 pm Post subject: |
|
|
You're welcome. 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. I also went ahead and put the $text var in the proper place. |
|
| Back to top |
|
 |
irq Voice
Joined: 14 Aug 2010 Posts: 3
|
Posted: Sat Aug 14, 2010 2:45 pm Post subject: |
|
|
| Luminous wrote: | You're welcome. 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. I also went ahead and put the $text var in the proper place. |
I just loaded alltools.tcl and it solved my trouble  |
|
| Back to top |
|
 |
Luminous Op
Joined: 12 Feb 2010 Posts: 146
|
Posted: Sat Aug 14, 2010 3:24 pm Post subject: |
|
|
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.  |
|
| Back to top |
|
 |
|