Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # /usr/bin/tclsh8.5 \
- exec tclsh "$0" "$@"
- # A quick little wrapper for the script to do quick testing of things like regexp
- # at the cli. Much nicer than rehashing the bot and spamming the channels a lot.
- # of course, you can only propperly test certain things to an extent this way
- # unless you go all the way and actually parse the user file, etc. Tho, this suffices.
- # Prob. left some fake proc's in here that are not needed, tho. Yet again, it's
- # stripped from my main script. Tho, much smaller like this ^.^
- proc channel { argy argx argz } {return 1}
- proc channels {} {return [list "#madscript" "#shr-staff"]}
- proc dputs {x} { puts "[unixtime]:$x" }
- proc putlog {x} {puts "[clock seconds]:$x"}
- proc puthelp {x {extra "-normal"}} {puts "$x"}
- proc putserv {x {extra "-normal"}} {puts "$x"}
- proc putquick {x {extra "-normal"}} {puts "$x"}
- proc ctime {x} {return [clock format $x -format {Y:%Y m:%m d:%d %H:%M:%S}]}
- proc timer {argv argy} {return "time[expr {int(rand()*200)}]"}
- proc utimer {argv argy} {return "time[expr {int(rand()*200)}]"}
- proc unixtime { } { return [clock seconds]}
- proc validchan {x} { return 1 }
- proc botonchan {x} { return 1 }
- proc getchanmode {x} { return 1 }
- proc setudef {argv argy} { return 1 }
- proc bind {a b c d} { return 1 }
- proc matchattr {argv argy} { return 0}
- proc putloglev {x channel argv} { puts "$argv" }
- #load SA_urltitle.tcl
- if {[catch {source SA_urltitle.tcl} errmsg]} {
- puts "Error: $errmsg"
- return
- }
- if {![string length $argv]} {
- puts "SA_urltitle.tcl cli test script."
- puts [string repeat # 64]
- puts "# Usage: $argv0 <url|string containing a url('s)> #"
- puts [string repeat # 64]
- return
- }
- set cliDebug 1 ;# display extra debug info. Tho I remove them before pushing to master mostly.
- pub_url "unitTestnick" "uniTestHost" "unitTestHand" "#unitTestChannel" $argv
- return
Add Comment
Please, Sign In to add comment