/[cvs]/eggdrop1.6/scripts/weed
ViewVC logotype

Annotation of /eggdrop1.6/scripts/weed

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download)
Sat Oct 9 15:46:34 1999 UTC (20 years ago) by fabian
Branch: MAIN
Changes since 1.1: +3 -4 lines
all changes to the 1.3 tree merged with 1.4

1 segfault 1.1 #!/usr/local/bin/tclsh
2     #
3     # weed out certain undesirables from an eggdrop userlist
4     # try just typing 'tclsh weed' to find out the options
5     # Robey Pointer, november 1994
6     #
7     # <cmwagner@gate.net>:
8     # I did a few bug fixes to the original weed script, things changed...
9     #
10     # when specifying other weed options they would unset the User() field and
11     # a maxlast weed would try and weed again and cause the script to stop due
12     # to User() being already unset (array nonexistant)
13     #
14     # when loadUserFile encountered an xtra field it would try and use the $info
15     # variable, which was supposed to be $xtra (something overlooked when the
16     # line was cut and pasted -- I hate it when that happens)
17     #
18     # changed the formatting of the saved weed file to match more closely to
19     # eggdrop 0.9tp (so this may cause incompatibilities), but when a hostmask
20     # field exactly matched 40 characters it would save it with no spaces after
21     # it and eggdrop would reject the user record. I know I could have easily
22     # changed one character, but I couldn't help myself. <grin>
23     # 5 march 96
24     #
25     # <robey, 23jul96>:
26     # upgrade for v2 userfiles
27     # <bruce s, 4sep96>:
28     # fixed xtra field from getting truncated
29     # <robey, 20sep96>:
30     # stopped it from mangling channel ban lists
31     # <Ec|ipse & dtM, 10jun97>:
32     # upgrade for v3 userfiles
33     # <Ec|ipse 18jun97>:
34     # added an option to remove users from unwanted channels
35     # <Ec|ipse 28oct97>:
36     # upgrade for v4 userfiles, with v3 converter
37     # <Ernst 8mar98>:
38     # fixed bug "list element in braces followed by X instead of space"
39     # (the use of "lrange" where you aren't sure if it's a list is bad)
40     # fixed --CONSOLE item not being included, creating "user" --CONSOLE
41     # <Ernst 1apr98>:
42     # two more improper ocurrences of "lrange" removed
43 fabian 1.2 # <rtc 20sep1999>:
44     # removed ancient way of determining the current time.
45 segfault 1.1 #
46    
47     set exempt {*ban *ignore}
48     set exemptops 0 ; set exemptmasters 0 ; set exemptfriends 0
49     set exemptparty 0 ; set exemptfile 0 ; set exemptchanm 0
50     set exemptbotm 0 ; set exemptchann 0 ; set exemptchanf 0
51     set exemptchano 0
52     set maxlast 0 ; set maxban 0 ; set maxignore 0
53     set weedops 0 ; set weedmasters 0 ; set weednopw 0
54     set stripops 0 ; set stripmasters 0 ; set weedlurkers 0
55     set chanrem {}
56     set convert 0
57    
58 fabian 1.2 set CURRENT [clock seconds]
59 segfault 1.1
60     if {$argc < 1} {
61     puts stdout "\nUsage: weed <userfile> \[options\]"
62     puts stdout " (weeds out users from an eggdrop userlist)"
63     puts stdout "Output goes to <userfile>.weed"
64     puts stdout "Possible options:"
65     puts stdout " -<nick> exempt this user from weeding"
66     puts stdout " ^o ^m ^f exempt ops or masters or friends"
67     puts stdout " ^co ^cm ^cf exempt chanops or chanmasters or chanfriends"
68     puts stdout " ^cn exempt chanowner"
69     puts stdout " ^p ^x exempt party-line or file-area users"
70     puts stdout " ^b exempt botnet master"
71     puts stdout " +<days> weed: haven't been seen in N days"
72     puts stdout " :n weed: haven't EVER been seen"
73     puts stdout " :o :m weed: ops or masters with no password set"
74     puts stdout " :a weed: anyone with no pasword set"
75     puts stdout " o m unop/unmaster: ops or masters with no pass."
76     puts stdout " b<days> weed: bans not used in N days"
77     puts stdout " i<days> weed: ignores created over N days ago"
78     puts stdout " =<chan> weed: channels nolonger supported"
79     puts stdout " c convert v3 eggdrop userfile"
80     puts stdout ""
81     exit
82     }
83     puts stdout "\nWEED 18jun97, robey\n"
84    
85     set filename [lindex $argv 0]
86     for {set i 1} {$i < $argc} {incr i} {
87     set carg [lindex $argv $i]
88     if {$carg == ":n"} {
89     set weedlurkers 1
90     } elseif {$carg == ":o"} {
91     set weedops 1 ; set stripops 0 ; set weednopw 0
92     } elseif {$carg == ":m"} {
93     set weedmasters 1 ; set stripmasters 0 ; set weednopw 0
94     } elseif {$carg == ":a"} {
95     set weednopw 1 ; set weedops 0 ; set weedmasters 0
96     set stripops 0 ; set stripmasters 0
97     } elseif {$carg == "o"} {
98     set stripops 1 ; set weedops 0 ; set weednopw 0
99     } elseif {$carg == "m"} {
100     set stripmasters 1 ; set weedmasters 0 ; set weednopw 0
101     } elseif {$carg == "^m"} {
102     set exemptmasters 1
103     } elseif {$carg == "^o"} {
104     set exemptops 1
105     } elseif {$carg == "^f"} {
106     set exemptfriends 1
107     } elseif {$carg == "^p"} {
108     set exemptparty 1
109     } elseif {$carg == "^x"} {
110     set exemptfile 1
111     } elseif {$carg == "^cf"} {
112     set exemptchanf 1
113     } elseif {$carg == "^cm"} {
114     set exemptchanm 1
115     } elseif {$carg == "^cn"} {
116     set exemptchann 1
117     } elseif {$carg == "^b"} {
118     set exemptbotm 1
119     } elseif {$carg == "^co"} {
120     set exemptchano 1
121     } elseif {$carg == "c"} {
122     set convert 1
123     } elseif {[string index $carg 0] == "-"} {
124     lappend exempt [string range $carg 1 end]
125     } elseif {[string index $carg 0] == "+"} {
126     set maxlast [expr 60*60*24* [string range $carg 1 end]]
127     } elseif {[string index $carg 0] == "b"} {
128     set maxban [expr 60*60*24* [string range $carg 1 end]]
129     } elseif {[string index $carg 0] == "i"} {
130     set maxignore [expr 60*60*24* [string range $carg 1 end]]
131     } elseif {[string index $carg 0] == "="} {
132     lappend chanrem [string tolower [string range $carg 1 end]]
133     } else {
134     puts stderr "UNKNOWN OPTION: '$carg'\n"
135     exit
136     }
137     }
138    
139     if {(!$weedlurkers) && (!$weedops) && (!$weedmasters) && (!$weednopw) &&
140     (!$stripops) && (!$stripmasters) && ($maxlast == 0) && ($convert == 0) &&
141     ($maxban == 0) && ($maxignore == 0) && ($chanrem == {})} {
142     puts stderr "PROBLEM: You didn't specify anything to weed out.\n"
143     exit
144     }
145    
146     set weeding { } ; set strip { } ; set exempting { }
147     if {$weedlurkers} { lappend weeding "lurkers" }
148     if {$weedops} { lappend weeding "pwdless-ops" }
149     if {$weedmasters} { lappend weeding "pwdless-masters" }
150     if {$weednopw} { lappend weeding "pwdless-users" }
151     if {$chanrem != {}} { lappend weeding "unwanted-channel" }
152     if {$maxlast > 0} { lappend weeding ">[expr $maxlast /(60*60*24)]-days" }
153     if {$maxban > 0} { lappend weeding "bans>[expr $maxban /(60*60*24)]-days" }
154     if {$maxignore > 0} { lappend weeding "ign>[expr $maxignore /(60*60*24)]-days" }
155     if {$weeding != { }} { puts stdout "Weeding:$weeding" }
156    
157     if {$stripops} { lappend strip "pwdless-ops" }
158     if {$stripmasters} { lappend strip "pwdless-masters" }
159     if {$strip != { }} { puts stdout "Stripping:$strip" }
160    
161     if {$exemptops} { lappend exempting "(ops)" }
162     if {$exemptmasters} { lappend exempting "(masters)" }
163     if {$exemptfriends} { lappend exempting "(friends)" }
164     if {$exemptparty} { lappend exempting "(party-line)" }
165     if {$exemptfile} { lappend exempting "(file-area)" }
166     if {$exemptchann} { lappend exempting "(channel-owners)" }
167     if {$exemptchanm} { lappend exempting "(channel-masters)" }
168     if {$exemptchano} { lappend exempting "(channel-ops)" }
169     if {$exemptchanf} { lappend exempting "(channel-friends)" }
170     if {$exemptbotm} { lappend exempting "(botnet masters)" }
171     if {[llength $exempt]>2} { lappend exempting "[lrange $exempt 2 end]" }
172     if {$exempting != { }} { puts stdout "Exempt:$exempting" }
173    
174     puts stdout "\nReading $filename ..."
175    
176     proc convertUserFile {fname} {
177     global User Hostmask Channel Botflag LastOn BotAddr Xtra convert
178     puts stdout "\nRunning Converter on $fname"
179     set oldhandle {}
180     if {[catch {set fd [open $fname r]}] != 0} { return 0 }
181     set line [string trim [gets $fd]]
182     if {[string range $line 1 2] == "3v"} {
183     set convert 1
184     } elseif {[string range $line 1 2] == "4v"} {
185     return 0
186     }
187     while {![eof $fd]} {
188     set line [string trim [gets $fd]]
189     if {([string index $line 0] != "#") && ([string length $line] > 0)} {
190     scan $line "%s" handle
191     if {$handle == "-"} {
192     # hostmask
193     set hmList [split [string range $line 2 end] ,]
194     for {set i 0} {$i < [llength $hmList]} {incr i} {
195     lappend Hostmask($oldhandle) [string trim [lindex $hmList $i]]
196     }
197     } elseif {$handle == "!"} {
198     # channel
199     set chList [string trim [string range $line 1 end]]
200     lappend Channel($oldhandle) "[lrange $chList 0 1] [string trim [lindex $chList end] 0123456789]"
201     } elseif {$handle == "*"} {
202     # dccdir
203     set dccdir [string trim [string range $line 2 end]]
204     set User($oldhandle) [lreplace $User($oldhandle) 2 2 $dccdir]
205     } elseif {$handle == "+"} {
206     # email
207     set email [string trim [string range $line 2 end]]
208     set User($oldhandle) [lreplace $User($oldhandle) 3 3 $email]
209     } elseif {$handle == "="} {
210     # comment
211     set comment [string trim [string range $line 2 end]]
212     set User($oldhandle) [lreplace $User($oldhandle) 4 4 $comment]
213     } elseif {$handle == ":"} {
214     # user info line / bot addresses
215     if {[lsearch [split [lindex $User($oldhandle) 0] ""] b] == -1} {
216     set info [string trim [string range $line 1 end]]
217     set User($oldhandle) [lreplace $User($oldhandle) 5 5 $info]
218     } else {
219     set BotAddr($oldhandle) [string trim [string range $line 1 end]]
220     }
221     } elseif {$handle == "."} {
222     # xtra field start
223     if {![info exists xtraList($oldhandle)]} {
224     set xtraList($oldhandle) [string trim [string range $line 1 end]]
225     } {
226     set xtraList($oldhandle) "$xtraList($oldhandle) [string trim [string range $line 1 end]]"
227     }
228     } elseif {$handle == "!!"} {
229     # laston
230     set LastOn($oldhandle) [lindex $line 1]
231     } else {
232     # finish up xtra field first
233     if {[info exists xtraList($oldhandle)]} {
234     for {set i 0} {$i < [llength $xtraList($oldhandle)]} {incr i} {
235     lappend Xtra($oldhandle) [string trim [lindex $xtraList($oldhandle) $i] \{]
236     }
237     }
238     # begin of new user
239     scan $line "%s %s %s %s" handle pass attr ts
240     if {$convert == 1 && $attr != ""} {
241     regsub -all {B} $attr {t} attr
242     set botflags "s h a l r" ; set Botflag($handle) ""
243     set nattr [split [string trim $attr 0123456789] ""] ; set attr ""
244     foreach flag $botflags {
245     if {[lsearch -exact $nattr $flag] != -1} {append Botflag($handle) $flag}
246     }
247     foreach flag $nattr {
248     if {[lsearch -exact $botflags $flag] == -1} {append attr $flag}
249     }
250     }
251     set User($handle) [list $attr $pass {} {} {} {}]
252     set Hostmask($handle) {}
253     set Channel($handle) {}
254     set oldhandle $handle
255     }
256     }
257     }
258     return 1
259     }
260    
261     proc loadUserFile {fname} {
262     global User Hostmask Channel Botflag LastOn BotAddr Xtra
263     set oldhandle {}
264     if {[catch {set fd [open $fname r]}] != 0} { return 0 }
265     set line [string trim [gets $fd]]
266     if {[string range $line 1 2] != "4v"} {
267     if {[string range $line 1 2] == "3v"} {
268     convertUserFile $fname
269     return 1
270     } else {
271     puts stderr "Unknown userfile version! (not v4)\n"
272     exit
273     }
274     }
275     while {![eof $fd]} {
276     set line [string trim [gets $fd]]
277     if {([string index $line 0] != "#") && ([string length $line] > 0)} {
278     scan $line "%s" handle
279     if {$handle == "--HOSTS"} {
280     # hostmask
281     set hmList [lindex $line 1]
282     lappend Hostmask($oldhandle) [string trim $hmList]
283     } elseif {$handle == "-"} {
284     # hostmask
285     set hmList [lindex $line 1]
286     lappend Hostmask($oldhandle) [string trim $hmList]
287     } elseif {$handle == "!"} {
288     # channel
289     set chList [string trim [string range $line 1 end]]
290     lappend Channel($oldhandle) $chList
291     } elseif {$handle == "--BOTADDR"} {
292     # botaddr
293     set BotAddr($oldhandle) [lindex $line 1]
294     } elseif {$handle == "--PASS"} {
295     # pass
296     set pass [string trim [string range $line [expr [string first " " $line] + 1] end]]
297     set User($oldhandle) [lreplace $User($oldhandle) 1 1 $pass]
298     } elseif {$handle == "--DCCDIR"} {
299     # dccdir
300     set first [string first " " $line]
301     if {$first != -1} {
302     set dccdir [string trim [string range $line [expr $first + 1] end]]
303     } {
304     set dccdir ""
305     }
306     set User($oldhandle) [lreplace $User($oldhandle) 2 2 $dccdir]
307     } elseif {$handle == "--COMMENT"} {
308     # comment
309     set first [string first " " $line]
310     if {$first != -1} {
311     set comment [string trim [string range $line [expr $first + 1] end]]
312     } {
313     set comment ""
314     }
315     set User($oldhandle) [lreplace $User($oldhandle) 4 4 $comment]
316     } elseif {$handle == "--INFO"} {
317     # user info line
318     set first [string first " " $line]
319     if {$first != -1} {
320     set info [string trim [string range $line [expr $first + 1] end]]
321     } {
322     set info ""
323     }
324     set User($oldhandle) [lreplace $User($oldhandle) 5 5 $info]
325     } elseif {$handle == "--CONSOLE"} {
326     # console
327     set first [string first " " $line]
328     if {$first != -1} {
329     set console [string trim [string range $line [expr $first + 1] end]]
330     } {
331     set console ""
332     }
333     set User($oldhandle) [lreplace $User($oldhandle) 6 6 $console]
334     } elseif {$handle == "--XTRA"} {
335     # xtra field
336     set first [string first " " $line]
337     if {$first != -1} {
338     set xtraList [string trim [string range $line [expr $first + 1] end]]
339     } {
340     set xtraList ""
341     }
342     lappend Xtra($oldhandle) $xtraList
343     } elseif {$handle == "--LASTON"} {
344     # laston
345     set LastOn($oldhandle) [lindex $line 1]
346     } elseif {$handle == "--BOTFL"} {
347     # botflags
348     set Botflag($oldhandle) [string trim [string range $line 1 end]]
349     } else {
350     # begin of new user
351     scan $line "%s %s %s" handle dash attr
352     set User($handle) [list $attr {} {} {} {} {} {}]
353     set Hostmask($handle) {}
354     set Channel($handle) {}
355     set oldhandle $handle
356     }
357     }
358     }
359     return 1
360     }
361    
362     proc saveUserFile fname {
363     global User Hostmask Channel Botflag LastOn BotAddr Xtra
364     if {[catch {set fd [open $fname w]}] != 0} { return 0 }
365     puts $fd "#4v: weed! now go away."
366     foreach i [array names User] {
367     set hmask "none"
368     set hmloop 0 ; set chloop 0 ; set loloop 0 ; set xloop 0 ; set aloop 0
369     if {[lindex $User($i) 1] == "bans"} {set plug "bans"} {set plug "-"}
370     set attr [lindex $User($i) 0]
371     set ts [lindex $User($i) 2]
372     puts $fd [format "%-9s %-20s %-24s" $i $plug $attr]
373     for {} {$hmloop < [llength $Hostmask($i)]} {incr hmloop} {
374     if {[string index $i 0] == "*" || [string range $i 0 1] == "::"} {
375     set hmask [lindex $Hostmask($i) $hmloop]
376     regsub -all {~} $hmask { } hmask
377     puts $fd "- $hmask"
378     } else {
379     puts $fd "--HOSTS [lindex $Hostmask($i) $hmloop]"
380     }
381     }
382     if {[info exists BotAddr($i)]} {
383     puts $fd "--BOTADDR [lindex $BotAddr($i) 0]"
384     }
385     if {[info exists Xtra($i)]} {
386     for {} {$xloop < [llength $Xtra($i)]} {incr xloop} {
387     puts $fd "--XTRA [lindex $Xtra($i) $xloop]"
388     }
389     }
390     if {[info exists Channel($i)]} {
391     for {} {$chloop < [llength $Channel($i)]} {incr chloop} {
392     puts $fd "! [lindex $Channel($i) $chloop]"
393     }
394     }
395     if {[info exists Botflag($i)]} {
396     if {$Botflag($i) != ""} { puts $fd "--BOTFL [lindex $Botflag($i) 0]" }
397     }
398     if {[string index $i 0] == "*" || [string range $i 0 1] == "::"} {
399     set User($i) [lreplace $User($i) 1 1 {}]
400     }
401     if {[lindex $User($i) 1] != {}} { puts $fd "--PASS [lindex $User($i) 1]" }
402     if {[lindex $User($i) 2] != {}} { puts $fd "--DCCDIR [lindex $User($i) 2]" }
403     if {[lindex $User($i) 3] != {}} { puts $fd "--XTRA EMAIL [lindex $User($i) 3]" }
404     if {[lindex $User($i) 4] != {}} { puts $fd "--COMMENT [lindex $User($i) 4]" }
405     if {[lindex $User($i) 5] != {}} { puts $fd "--INFO [lindex $User($i) 5]" }
406     if {[lindex $User($i) 6] != {}} { puts $fd "--CONSOLE [lindex $User($i) 6]" }
407     if {[info exists LastOn($i)]} {
408     puts $fd "--LASTON [lindex $LastOn($i) 0]"
409     }
410     }
411     close $fd
412     return 1
413     }
414    
415     if {![loadUserFile $filename]} {
416     puts stdout "* Couldn't load userfile!\n"
417     exit
418     }
419    
420     if {$convert == 0} {
421     puts stdout "Loaded. Weeding..."
422     puts stdout "(pwd = no pass, -o/-m = removed op/master, lrk = never seen, exp = expired)"
423     puts stdout "(uwc = unwanted channel)\n"
424     } else {
425     puts stdout "Loaded. Converting..."
426     }
427    
428     set total 0
429     set weeded 0
430     foreach i [array names User] {
431     incr total
432     set attr [lindex $User($i) 0]
433     set chanattr [lindex [lindex $Channel($i) 0] 2]
434     if {([lsearch -exact $exempt $i] == -1) &&
435     ([string range $i 0 1] != "::") &&
436     ([string range $i 0 1] != "--") &&
437     (([string first o $attr] == -1) || (!$exemptops)) &&
438     (([string first m $attr] == -1) || (!$exemptmasters)) &&
439     (([string first f $attr] == -1) || (!$exemptfriends)) &&
440     (([string first p $attr] == -1) || (!$exemptparty)) &&
441     (([string first x $attr] == -1) || (!$exemptfile)) &&
442     (([string first t $attr] == -1) || (!$exemptbotm)) &&
443     (([string first f $chanattr] == -1) || (!$exemptchanf)) &&
444     (([string first m $chanattr] == -1) || (!$exemptchanm)) &&
445     (([string first n $chanattr] == -1) || (!$exemptchann)) &&
446     (([string first o $chanattr] == -1) || (!$exemptchano))} {
447     set pass [lindex $User($i) 1]
448     if {[info exists LastOn($i)]} { set ts [lindex $LastOn($i) 0] } { set ts 0 }
449     if {([string compare $pass "-"] == 0) && ([string first b $attr] == -1)} {
450     if {$weednopw == 1} {
451     unset User($i) ; incr weeded
452     puts -nonewline stdout "[format "pwd: %-10s " $i]"
453     } elseif {([string first o $attr] != -1) && ($weedops == 1)} {
454     unset User($i) ; incr weeded
455     puts -nonewline stdout "[format "pwd: %-10s " $i]"
456     } elseif {([string first m $attr] != -1) && ($weedmasters == 1)} {
457     unset User($i) ; incr weeded
458     puts -nonewline stdout "[format "pwd: %-10s " $i]"
459     }
460     if {([string first o $attr] != -1) && ($stripops == 1)} {
461     set nattr {}
462     for {set x 0} {$x < [string length $attr]} {incr x} {
463     if {[string index $attr $x] != "o"} {
464     set nattr [format "%s%s" $nattr [string index $attr $x]]
465     }
466     }
467     if {$nattr == {}} { set nattr "-" }
468     set User($i) [lreplace $User($i) 0 0 $nattr]
469     puts -nonewline stdout "[format " -o: %-10s " $i]"
470     }
471     if {([string first m $attr] != -1) && ($stripmasters == 1)} {
472     set nattr {}
473     for {set x 0} {$x < [string length $attr]} {incr x} {
474     if {[string index $attr $x] != "m"} {
475     set nattr [format "%s%s" $nattr [string index $attr $x]]
476     }
477     }
478     if {$nattr == {}} { set nattr "-" }
479     set User($i) [lreplace $User($i) 0 0 $nattr]
480     puts -nonewline stdout "[format " -m: %-10s " $i]"
481     }
482     }
483     if {($ts==0) && ($weedlurkers==1) && ([string first b $attr] == -1) && [info exists User($i)]} {
484     unset User($i) ; incr weeded
485     puts -nonewline stdout "[format "lrk: %-10s " $i]"
486     }
487     if {($ts > 0) && ($maxlast > 0) && ($CURRENT-$ts > $maxlast && [info exists User($i)])} {
488     unset User($i) ; incr weeded
489     puts -nonewline stdout "[format "exp: %-10s " $i]"
490     }
491     if {$chanrem != {} && [info exists Channel($i)]} {
492     foreach unchan $chanrem {
493     set id [lsearch [string tolower $Channel($i)] *$unchan*]
494     if {$id != -1} {
495     set Channel($i) [lreplace $Channel($i) $id $id] ; incr weeded
496     puts -nonewline stdout "[format "uwc: %-10s " $i]"
497     }
498     }
499     }
500     }
501     flush stdout
502     }
503     if {$weeded == 0 && $convert == 0} { puts -nonewline stdout "uNF... Nothing to weed!" }
504     puts stdout "\n"
505    
506     foreach i [array names User] {
507     if {([string range $i 0 1] == "::") || ($i == "*ban")} {
508     for {set j 0} {$j < [llength $Hostmask($i)]} {incr j} {
509     set ban [split [lindex $Hostmask($i) $j] :]
510     if {[string range [lindex $ban 2] 0 0] == "+"} {
511     set lastused [lindex $ban 3]
512     if {($maxban > 0) && ($CURRENT-$lastused > $maxban)} {
513     if {$i == "*ban"} {
514     puts stdout "Expired ban: [lindex $ban 0]"
515     } {
516     puts stdout "Expired ban on [string range $i 2 end]: [lindex $ban 0]"
517     }
518     set Hostmask($i) [lreplace $Hostmask($i) $j $j]
519     incr j -1
520     }
521     }
522     }
523     }
524     if {$i == "*ignore"} {
525     for {set j 0} {$j < [llength $Hostmask($i)]} {incr j} {
526     set ign [split [lindex $Hostmask($i) $j] :]
527     set lastused [lindex $ign 3]
528     if {($maxignore > 0) && ($CURRENT-$lastused > $maxignore)} {
529     puts stdout "Expired ignore: [lindex $ign 0]"
530     set Hostmask($i) [lreplace $Hostmask($i) $j $j]
531     incr j -1
532     }
533     }
534     }
535     }
536    
537     puts stdout "\nFinished scan."
538     puts stdout "Original total ($total), new total ([expr $total-$weeded]), zapped ($weeded)"
539    
540     if {![saveUserFile $filename.weed]} {
541     puts stdout "* uNF... Couldn't save new userfile!\n"
542     exit
543     }
544     puts stdout "Wrote $filename.weed"

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23