proc sendtoirc { chan list } {
   global maxwords method grp
   set offset1 0
   set offset2 0
   if {[llength $list] > $maxwords} {
      while {$offset1 < [llength $list]} {
         putserv "PRIVMSG $grp :[join [lrange $list $offset1 $offset2]]"
         set offset1 [expr $offset1 + $maxwords + 1]
         set offset2 [expr $offset2 + $maxwords]
      }
   } else {
      putserv "PRIVMSG $grp :[join $list]"
   }
}