All pastes #29573 Raw Edit

Mine

public text v1 · immutable
#29573 ·published 2005-11-20 14:04 UTC
rendered paste body
 if { ([regexp -all {\-} $rls] > 1 || [regexp -all {_} $rls] > 1) && [string match -nocase $cmd "!addpre"] } { set gen(dots-[string tolower $chan]) $rls }
 if { ([regexp -all {\-} $rls] < 2 && [gen:dotcheck $rls $gen(dots-[string tolower $chan])] == 0) && [string match -nocase $cmd "!addpre"] } {
  putquick "$header Dashes and underscores replaced with dots, should be: $gen(dots-[string tolower $chan])\002"
  gen:log 0 "\0037ALERT:\0037 $chan : $nick -> $rls should be $gen(dots-[string tolower $chan])"
  return 0
 }

proc gen:dotcheck {newrls oldrls} {
 global gen
 set split [string last "-" $oldrls]
 set oldrls [string map {"-" "." "_" "."} $oldrls]
 set oldrls [string replace $oldrls $split $split "-"]
 if { [string match -nocase $newrls $oldrls] } { return 0 } else { return 1 }
}