Skip to content

Instantly share code, notes, and snippets.

@jyotty
Created October 30, 2008 11:20
Show Gist options
  • Save jyotty/20971 to your computer and use it in GitHub Desktop.
Save jyotty/20971 to your computer and use it in GitHub Desktop.
proc welcome args {
set i [lsearch -exact $args to]
set w [bt to irc]
if {$args eq ""} {
set n [bt [name]]
} elseif {$i == -1} {
set n [bt [join $args]]
} else {
set n [bt [join [lrange $args 0 [expr $i-1]]]]
set w [bt to [join [lrange $args [expr $i+1] end]]]
}
return [join [list $n [bt welcome] $w] "\n \n"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment