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.

Search found 720 matches

by Papillon
Sun Mar 10, 2013 10:11 am
Forum: Scripting Help
Topic: need help with lists
Replies: 14
Views: 9536

Madalin: Instead of using a foreach loop which is slow, why not just use the standard tcl-command lsearch ? LoKii: In that case I would use a loop on each word said by the user and do a lsearch on the list. Word of warning though, if your channel is very crowded and people are chatty this will be ve...
by Papillon
Thu Feb 02, 2012 3:19 pm
Forum: Script Requests
Topic: need flood protection for troll.tcl
Replies: 5
Views: 5542

Code: Select all

putserv "NOTICE $nick :Next command only after [expr $troll(delay) - [expr [clock seconds] - $troll(lasttime,$chan)]] seconds. Yon can use 1 request in $cmd(delay) seconds." 
just a small typo in here.

Code: Select all

$cmd(delay)
should off course be

Code: Select all

$troll(delay)
by Papillon
Wed Feb 01, 2012 1:49 pm
Forum: Scripting Help
Topic: Problem nick list html
Replies: 13
Views: 10794

Your problem lies in the list:log proc else { lappend ::v(op) $cnick } probably just a typo, but I am guessing it should be: else { lappend ::u(nop) $cnick } you were in fact putting all the people not voice, halfop or op into a list which were never used.
by Papillon
Tue Feb 08, 2011 12:19 pm
Forum: Scripting Help
Topic: Binds to msg and pub allow scripts to interact - SOLVED
Replies: 7
Views: 5919

@silenus: Good that you solved it. It is just to remember that when you name a global variable or procedure, that name is truly global in your bot. You may have a procedure in one script, but call it from another script. Namespaces helps solve this problem if used correctly :) @caesar: it is me ye, ...
by Papillon
Mon Feb 07, 2011 1:37 pm
Forum: Scripting Help
Topic: Binds to msg and pub allow scripts to interact - SOLVED
Replies: 7
Views: 5919

You are sort of answering your own question. There are indeed two different binds, but they are both bound to the same procedure, or to two different procedures called by the same name... this will always cause troubles.

get_message rename one of them and they will not interfere with eachother
by Papillon
Sat Feb 06, 2010 8:13 am
Forum: Scripting Help
Topic: chars
Replies: 4
Views: 5068

Code: Select all

set mapfile [string map {  "" & "&" " \" " \"} $mapfile] 
by Papillon
Sat Feb 06, 2010 8:10 am
Forum: Scripting Help
Topic: hi guys why wont this work
Replies: 4
Views: 4147

Code: Select all

 bind pub - !fact pub:RandomFact


proc RandomFact {nick uhost hand chan args} { 
you might even spot it yourself ;)
by Papillon
Thu May 21, 2009 5:19 pm
Forum: Script Requests
Topic: Trap Bot: delete word on file
Replies: 4
Views: 3224

try something like this

Code: Select all

proc logip {ip} {
	set file [open iplog.txt a+]
	set info [split [read $file] \n]]
	if {$ip != "0.0.0.0" && [string equal [lsearch -exact $info $ip] "-1"]} {
		puts $file "$ip"
	}
	close $file
}
by Papillon
Wed May 13, 2009 9:31 am
Forum: Scripting Help
Topic: Max 10 lines in file
Replies: 6
Views: 5111

Code: Select all

set fd [open thefile "RDONLY"]
set tmp [split [read -nonewline $thefile] "\n"] 
should be $fd, as in:

Code: Select all

set fd [open thefile "RDONLY"]
set tmp [split [read -nonewline $fd] "\n"] 
by Papillon
Wed May 06, 2009 2:03 pm
Forum: Scripting Help
Topic: Inverting regsub's functions
Replies: 2
Views: 2936

Use Regexp

Code: Select all

set txt SomeTextHere
regexp -all {Text} $txt new
$new will contain the match, in this case "Text"
by Papillon
Mon Feb 23, 2009 6:20 pm
Forum: Scripting Help
Topic: Scraping a little bit of text
Replies: 2
Views: 2443

try:

Code: Select all

if {![regexp -- {<li><label>Currently Hosting:</label>(.+)</li>} $html - s_login]} {set s_login Unknown}
by Papillon
Fri Jan 23, 2009 6:51 am
Forum: Scripting Help
Topic: Bind msg input to be a string?
Replies: 3
Views: 2852

Code: Select all

bind pubm - "* $love" pub:love 
not that different as you see
by Papillon
Thu Jan 22, 2009 8:59 pm
Forum: Scripting Help
Topic: Bind msg input to be a string?
Replies: 3
Views: 2852

we all have to start somewhere :) I suggest taking a look at the tcl-commands.doc that comes with your eggdrop.. lot's of nice commands in there, one you might find interesting is (6) PUBM (stackable) bind pubm <flags> <mask> <proc> procname <nick> <user@host> <handle> <channel> <text> Description: ...
by Papillon
Mon Jan 19, 2009 5:23 pm
Forum: Script Support & Releases
Topic: Help me please irco.voicecontrol.tcl
Replies: 10
Views: 9385

set who [lindex $arg 0] set why [lrange $arg 1 end] here you are using a list command on a string. try making the $arg into a list first using split. set who [lindex [split $arg] 0] set why [lrange [split $arg] 1 end] and eggdrop comes with its own kick command, you could try using that putkick <ch...
by Papillon
Sat Jan 03, 2009 11:26 am
Forum: Other Topics
Topic: Happy New Year 2009
Replies: 5
Views: 5341

happy new year everyone