proc eputserv {key text} {
   set message [string range $text [expr [string first {:} $text] +1] end]
   set pre [string range $text 0 [expr [string first {:} $text] -1]]
   putserv "$pre :+OK [encrypt $key $message]"
}

just replace your purservs...example:

change: putserv "PRIVMSG $chan :$line"

to: eputserv abc123 "PRIVMSG $chan :$line"

where 'abc123' is the encryption key you want to use...this may also be a variable

example: eputserv $key "PRIVMSG $chan :$line"
