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.

Does this look correct?

Old posts that have not been replied to for several years.
Locked
a
adam15906
Voice
Posts: 10
Joined: Fri Sep 19, 2003 1:35 pm

Does this look correct?

Post by adam15906 »

Ok I need a bot that looks at XDCC's for the correct files.
The first time will look for one of the first files then the second timer will look for the second group.

set smallfilepack1 "LaLaLa"
set smallfilepack2 "LaLaLa"
set smallfilepack3 "LaLaLa"
set bigfilepack1 "LaLaLa"
set bigfilepack2 "LaLaLa"
set bigfilepack3 "LaLaLa"

set remscanhan "#adam"
set remscanmin 10
bind time - "* * * * *" time:scan
proc time:scan {min hour day month year} {
global remscanchan remscanmin
if {[expr [string trimleft $min "0"] % $remscanmin]} { return }
bind pub - "*" scan:1
proc scan:1 {nick uhost hand chan text} {
if [string match * $smallfilepack1 ] { break }
elseif [string match * $smallfilepack2 ] { break }
elseif [string match * $smallfilepack3 ] { break }
else { PRIVMSG $nick :This is a timed alert that goes off when it is detected that your are not serving the required packs. Please fix your XDCC if this is true or contact an OP/HOP if you feel this is a problem. }
return 0
}

set remscanhan2 "#adam"
set remscanmin2 10
bind time - "* * * * *" time:scan
proc time:scan2 {min hour day month year} {
global remscanchan2 remscanmin2
if {[expr [string trimleft $min "0"] % $remscanmin]} { return }
bind pub - "*" scan:1
proc scan:1 {nick uhost hand chan text} {
if [string match * $bigfilepack1 ] { break }
elseif [string match * $bigfilepack2 ] { break }
elseif [string match * $bigfilepack3 ] { break }
else { PRIVMSG $nick :This is a timed alert that goes off when it is detected that your are not serving the required packs. Please fix your XDCC if this is true or contact an OP/HOP if you feel this is a problem. }
return 0
}



Does this look like it will work right?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Re: Does this look correct?

Post by user »

adam15906 wrote:Does this look like it will work right?
No. Learn Tcl, then come back and post your code with [code][/code] around it and some indentation to make it readable.
Have you ever read "The Manual"?
Locked