irc_example.tcl

Go to the documentation of this file.
00001 /* ! /bin/sh*/
00002 /*  -*- tcl -*- \*/
00003 exec tclsh "$0" ${1+"$@"}
00004 
00005 /*  irc example script, by David N. Welton <davidw@dedasys.com>*/
00006 /*  $Id: irc_example.tcl,v 1.9 2004/03/25 07:23:59 andreas_kupries Exp $*/
00007 
00008 /*  I include these so that it can find both the irc package and the*/
00009 /*  logger package that irc needs.*/
00010 
00011  auto = _path "[file join [file dirname [info script]] .. .. modules irc] $auto_path"
00012  auto = _path "[file join [file dirname [info script]] .. .. modules log] $auto_path"
00013 package require irc 0.4
00014 
00015 namespace ircclient {
00016     variable channel \/* tcl*/
00017 
00018     /*  Pick up a nick from the command line, or default to TclIrc.*/
00019     if { [lindex $::argv 0] != "" } {
00020      nick =  [lindex $::argv 0]
00021     } else {
00022      nick =  TclIrc
00023     }
00024 
00025      cn =  [::irc::connection]
00026     /*  Connect to the server.*/
00027     $cn connect irc.freenode.net 6667
00028     $cn user $nick localhost domain "www.tcl.tk"
00029     $cn nick $nick
00030     while { 1 } {
00031     source mainloop.tcl
00032     vwait ::ircclient::RELOAD
00033     }
00034 }
00035 
00036 

Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1