irc_example.tcl
Go to the documentation of this file.00001
00002
00003 exec tclsh "$0" ${1+"$@"}
00004
00005
00006
00007
00008
00009
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 \
00017
00018
00019 if { [lindex $::argv 0] != "" } {
00020 nick = [lindex $::argv 0]
00021 } else {
00022 nick = TclIrc
00023 }
00024
00025 cn = [::irc::connection]
00026
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