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

Diff of /eggdrop1.6/scripts/weed

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

revision 1.5 by fabian, Tue Dec 21 17:35:08 1999 UTC revision 1.6 by guppy, Fri Apr 13 19:19:14 2001 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2  # ^-- little trick to restart using tclsh \  # This trick is borrowed from Tothwolf's Wolfpack \
3  exec tclsh "$0" "$@"  # Search for tclsh[0-9].[0-9] in each valid dir in PATH \
4    for dir in $(echo $PATH | sed 's/:/ /g'); \
5    do \
6      if test -d $dir; \
7      then \
8        files=$(/bin/ls $dir | egrep '^tclsh[0-9]\.[0-9]$'); \
9        if test "$files" != ""; \
10        then \
11          versions="${versions:+$versions }$(echo $files | sed 's/tclsh//g')"; \
12        fi; \
13      fi; \
14    done; \
15    for ver in $versions; \
16    do \
17      tmpver=$(echo $ver | sed 's/\.//g'); \
18      if test "$lasttmpver" != ""; \
19      then \
20        if test "$tmpver" -gt "$lasttmpver"; \
21        then \
22          lastver=$ver; \
23          lasttmpver=$tmpver; \
24        fi; \
25      else \
26        lastver=$ver; \
27        lasttmpver=$tmpver; \
28      fi; \
29    done; \
30    exec tclsh$lastver "$0" "$@"
31  #  #
32  # $Id$  # $Id$
33  #  #
# Line 46  exec tclsh "$0" "$@" Line 73  exec tclsh "$0" "$@"
73  #     two more improper ocurrences of "lrange" removed  #     two more improper ocurrences of "lrange" removed
74  # <rtc 20sep1999>:  # <rtc 20sep1999>:
75  #     removed ancient way of determining the current time.  #     removed ancient way of determining the current time.
76  # <Tothwolf 21oct1999  # <Tothwolf 21oct1999>:
77  #     [clock] isn't in all versions of Tcl...  #     [clock] isn't in all versions of Tcl...
78    # <guppy 12Apr2001>:
79    #     borrowed code from Tothwolf's Wolfpack to find tclsh better
80  #  #
81    
82  set exempt {*ban *ignore}  set exempt {*ban *ignore}
# Line 295  proc loadUserFile {fname} { Line 324  proc loadUserFile {fname} {
324          lappend Hostmask($oldhandle) [string trim $hmList]          lappend Hostmask($oldhandle) [string trim $hmList]
325        } elseif {$handle == "-"} {        } elseif {$handle == "-"} {
326          # hostmask          # hostmask
327          set hmList [lindex $line 1]          set hmList [join [lrange $line 1 end]]
328          lappend Hostmask($oldhandle) [string trim $hmList]          lappend Hostmask($oldhandle) [string trim $hmList]
329        } elseif {$handle == "!"} {        } elseif {$handle == "!"} {
330          # channel          # channel

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23