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

by greenbear
Fri Mar 18, 2005 12:44 am
Forum: Archive
Topic: Read from a TXT file in alternative lines...
Replies: 13
Views: 9937

Turns out .txt files are sendt as part of the header...
I edited the code above, so go ahead and give it a try.
by greenbear
Thu Mar 17, 2005 10:47 pm
Forum: Archive
Topic: Read from a TXT file in alternative lines...
Replies: 13
Views: 9937

# Set the chans you want to enable it in to +news # .chanset #channel +news # set this to the URL of the news file set newsfile "http://someurl.com/file.txt" # want the answer to come out in notice (0) or privmsg (1)? set tellwho 0 setudef flag news if ![info exists egghttp(version)] { pu...
by greenbear
Thu Mar 17, 2005 6:45 pm
Forum: Archive
Topic: Read from a TXT file in alternative lines...
Replies: 13
Views: 9937

Downloading files off the internet and then processing them is obviously a whole different ballgame than just reading a local file.

Have a look at the http package that comes with tcl, or possibly egghttp.tcl.

There should be plenty of examples on how to use both on this forum, just search for it.
by greenbear
Thu Mar 17, 2005 3:32 pm
Forum: Archive
Topic: info for bf
Replies: 3
Views: 3879

assuming you store the pretime in a unixtime format you can change the relevant part in your script to something like this

Code: Select all

# limit, in seconds
set maxtime 300
if {[expr [unixtime]-$pretime]>=$maxtime} {
  # it's too old, send warning
} {
  # normal pretime msg
}
by greenbear
Thu Mar 17, 2005 1:43 pm
Forum: Archive
Topic: info for bf
Replies: 3
Views: 3879

Sounds like you need a prebot.
by greenbear
Wed Mar 16, 2005 7:39 pm
Forum: Archive
Topic: -dynamicbans&+ban=stick !?
Replies: 2
Views: 2271

Sounds like you want +dynamicbans, only with a longer ban-time.
Try setting ban-time to 1440 instead of 120 (1 day instead of 2hours).
by greenbear
Wed Mar 16, 2005 2:38 pm
Forum: Archive
Topic: hi
Replies: 4
Views: 3024

yea i made the code with both user and pass first, then i figured he'd never want to oper up someone else from the bot, and changed it. :D

now he have code to do both, even better!
by greenbear
Wed Mar 16, 2005 1:27 pm
Forum: Archive
Topic: hi
Replies: 4
Views: 3024

Code: Select all

bind dcc n operme operme
proc operme {h i a} {
 if ![llength $a] {
   putidx $i "Usage: .operme <pass>"
   return
 }
 set p [lindex [split $a] 0]
 putserv "oper $::$botnick $p"
 putidx $i "Done."
}
by greenbear
Wed Mar 16, 2005 12:18 pm
Forum: Archive
Topic: mysqltcl
Replies: 3
Views: 2109

You could give the mysql module for eggdrop a try

http://barkerjr.net/irc/eggdrop/modules/
by greenbear
Wed Mar 16, 2005 12:24 am
Forum: Archive
Topic: botnet sending commands
Replies: 2
Views: 1614

it's specified in the proc you call on the receiving bot

Code: Select all

bind bot b keyword proc:name
proc proc:name {frombot cmd arg} {
 #...
}
ie. $frombot or whatever name you specified in the proc header.
by greenbear
Tue Mar 15, 2005 8:58 pm
Forum: Archive
Topic: newban & newchanban banning uncomplete ident
Replies: 5
Views: 2277

Looks like 11 to me
.tcl string length *_aaabbbccc
Tcl: 11
You can always use maskhost to make sure you have a properly masked host
.tcl maskhost _aaabbbccc@localhost
Tcl: *!*abbbccc@localhost
by greenbear
Tue Mar 15, 2005 8:33 pm
Forum: Archive
Topic: Read from a TXT file in alternative lines...
Replies: 13
Views: 9937

Just replace that while loop in your code with this one

Code: Select all

while {![eof $news]} {
 set line [gets $news]
 if {![string match ####* $line]} {
  if {$tellwho} {
   putserv "PRIVMSG $nick :$line"
   } else {
   putserv "NOTICE $nick :$line"
  }
 }
}
by greenbear
Tue Mar 15, 2005 8:18 pm
Forum: Archive
Topic: Read from a TXT file in alternative lines...
Replies: 13
Views: 9937

Code: Select all

if ![string match ####* $line] {
  # parse it
}
by greenbear
Tue Mar 15, 2005 8:08 pm
Forum: Archive
Topic: newban & newchanban banning uncomplete ident
Replies: 5
Views: 2277

it probably get cut off at the end because you feed it faulty idents, there's a max limit of 10chars, that includes your wildcard.
by greenbear
Tue Mar 15, 2005 3:38 pm
Forum: Archive
Topic: Taking an input from a shell command
Replies: 19
Views: 8725

Code: Select all

set fruitname "oranges"

bind pub -|- !fruit pub:fruit
proc pub:fruit {n u h c a} {
 global fruitname
 putserv "PRIVMSG $c :Today's fruit is $fruitname!"
}