# must set host
defset port 6667
+defset socketargs {}
defset nick testbot
defset ident blight
if {[string length $n] > 18} { error "nick too long" }
}
+proc check_chan {n} {
+ if {![regsub {^\#} $n {} n]} { error "bad chan start" }
+ if {[regexp -nocase {[^][\\`_^{|}a-z0-9-]} $n]} { error "bad char in chan" }
+ if {[regexp {^[-0-9]} $n]} { error "bad chan name start" }
+ if {[string length $n] > 18} { error "chan name too long" }
+}
+
proc ischan {dest} {
return [regexp {^[&#+!]} $dest]
}