/[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.1 - (hide annotations) (download)
Mon Sep 13 14:36:18 1999 UTC (20 years, 1 month ago) by segfault
Branch: MAIN
Initial commit based off of .29 cvs

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

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23