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 963 matches

by stdragon
Sun Dec 16, 2001 9:43 am
Forum: Archive
Topic: Cannot work :(
Replies: 4
Views: 1082

Instead of

if {(a) || (b) == 0}

try

if {!(a) && !(b)}
by stdragon
Sun Dec 16, 2001 9:25 am
Forum: Archive
Topic: problem witch a function in a c modul
Replies: 5
Views: 1635

Well I didn't look at all of it, but right away I noticed this:

strcat(query,table);

You can't do that, there's no room in the query array for more data the way it's defined.
by stdragon
Sat Dec 15, 2001 8:20 pm
Forum: Archive
Topic: Help with ban script
Replies: 18
Views: 3153

if {[string range $t 2] == "-"} {



should be



if {[string index $t 2] == "-"} {
by stdragon
Fri Dec 14, 2001 12:04 pm
Forum: Archive
Topic: Help
Replies: 7
Views: 1346

Try unloading the dns module, that helped me. (find the line that says "loadmodule dns" and put a "#" at the beginning)
by stdragon
Fri Dec 14, 2001 11:56 am
Forum: Archive
Topic: Help with ban script
Replies: 18
Views: 3153

You might want to make that first one "string range" instead of "string index"
by stdragon
Fri Dec 14, 2001 11:55 am
Forum: Archive
Topic: TCL Error One more time :((
Replies: 11
Views: 2088


timer 1 {return topten}


That is awful... I think I know what happened hehe. The programmer wanted the procedure to pause for a minute and then return topten. I've seen people put if statements in timers too, because they wanted the proc to pause.
by stdragon
Wed Dec 12, 2001 7:50 pm
Forum: Archive
Topic: TCL Error
Replies: 2
Views: 523

Add this to the tcl file:

Code: Select all

proc putchan {chan text} {
  putserv "PRIVMSG $chan :$text"
  return 0
}
by stdragon
Wed Dec 12, 2001 7:47 pm
Forum: Archive
Topic: 2 things
Replies: 2
Views: 607

Since you said the text file is several megabytes, I did some non-standard line selection code so that it doesn't need to know the number of lines or scan in the whole file. If you have 100k lines, finding the 50k'th line takes a while in tcl heh. So the end result is that it may be very slightly bi...
by stdragon
Wed Dec 12, 2001 7:47 am
Forum: Archive
Topic: accent
Replies: 2
Views: 637

Use regular expressions, and make the answer mask like this: (é|è|e)lise A rougher way of doing it is to substitute the non-accented letter for the accented one: # User's guess set guess "èlïse" regsub -all è|é|ê|ë $guess e guess regsub -all ì|í|î|ï $guess i guess regsub -all ò|ó|ô|õ|ö $gu...
by stdragon
Wed Dec 12, 2001 7:40 am
Forum: Archive
Topic: very basic ..
Replies: 1
Views: 474

I didn't test this but it should work:

Code: Select all

bind pub - foo gotfoo
proc gotfoo {nick uhost hand chan text} {
  foreach person [chanlist $chan] {
    putserv "privmsg $person :bar"
  }
  return 0
}
by stdragon
Tue Dec 04, 2001 12:54 am
Forum: Archive
Topic: Two TCL Problems
Replies: 7
Views: 1093

Ppslim is right about using , you should listen to his advice vxspiritxv. As to your second problem, you are right, eggdrop will only run it about once a second, because that is how eggdrop's event loop works. That also means that you can't use the 'after' command with a granularity of less than a s...
by stdragon
Mon Dec 03, 2001 10:47 pm
Forum: Archive
Topic: Best idea(s) of the millenium!
Replies: 15
Views: 1991

I already wrote a script like that

http://home.dal.net/stdragon/eggdrop/hasidentified.tcl

It works like this..

Code: Select all

proc mycallback {nick ident} {
  if {$ident == 1} {
    # has identified
  } else {
    # hasn't identified
  }
}

hi_check stdragon mycallback
by stdragon
Sat Dec 01, 2001 10:45 pm
Forum: Archive
Topic: proc
Replies: 5
Views: 946

Try reading the tcl manual at tcl.activestate.com or dev.scriptics.com

It explains all about procs.
by stdragon
Sat Dec 01, 2001 10:42 pm
Forum: Archive
Topic: TCL script help :)
Replies: 13
Views: 1406

The problem with your examples is that in the first one, you wanted only the word that contains the trigger. In the second one, you wanted the trigger, plus the two preceding words. With the information you have given, the computer can't know whether to extract 1, 2, 3, or more words. So, you need t...
by stdragon
Thu Nov 15, 2001 2:32 am
Forum: Archive
Topic: Sockets
Replies: 1
Views: 488

Don't use list commands on a string (lindex $arg). Also, there's a reason they're called variable *names* and not variable numbers. Don't use confusing variable names like "1" and "2" that just makes the code harder to understand. More to the point at hand, you split $test up int...