This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Need help with lag.tcl

Support & discussion of released scripts, and announcements of new releases.
Post Reply
i
irq
Voice
Posts: 3
Joined: Sat Aug 14, 2010 2:03 pm

Need help with lag.tcl

Post by irq »

Code: Select all

### 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"
L
Luminous
Op
Posts: 146
Joined: Fri Feb 12, 2010 1:00 pm

Post by Luminous »

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: Select all

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.
i
irq
Voice
Posts: 3
Joined: Sat Aug 14, 2010 2:03 pm

Post by irq »

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: Select all

proc putmsg {chan text} {
  putserv "PRIVMSG $chan :blah blah blah"
}
Should work if you load that by itself. :)
Thx Luminous !!!! It worked ;)
L
Luminous
Op
Posts: 146
Joined: Fri Feb 12, 2010 1:00 pm

Post by Luminous »

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
irq
Voice
Posts: 3
Joined: Sat Aug 14, 2010 2:03 pm

Post by irq »

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 :D
L
Luminous
Op
Posts: 146
Joined: Fri Feb 12, 2010 1:00 pm

Post by Luminous »

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. :)
Post Reply