mainloop.tcl

Go to the documentation of this file.
00001 /*  Main body of code.*/
00002 
00003 puts -nonewline "Loading [info script] ..."
00004 
00005 /*     $cn connect irc.freenode.net 6667*/
00006 $cn registerevent 001 "$cn join $channel"
00007 
00008 /*  Register a default action for commands from the server.*/
00009 $cn registerevent defaultcmd {
00010     puts "[action] [msg]"
00011 }
00012 
00013 /*  Register a default action for numeric events from the server.*/
00014 $cn registerevent defaultnumeric {
00015     puts "[action] XXX [target] XXX [msg]"
00016 }
00017 
00018 /*  Register a default action for events.*/
00019 $cn registerevent defaultevent {
00020     puts "[action] XXX [who] XXX [target] XXX [msg]"
00021 }
00022 
00023 /*  Register a default action for PRIVMSG (either public or to a*/
00024 /*  channel).*/
00025 
00026 $cn registerevent PRIVMSG {
00027     puts "[who] says to [target] [msg]"
00028 }
00029 
00030 /*  If you uncomment this, you can change this file and reload it*/
00031 /*  without shutting down the network connection.*/
00032 
00033 if {0} {
00034     $cn registerevent PRIVMSG {
00035     puts "[who] says to [target] [msg]"
00036     if { [msg] == "RELOAD" && [target] == $::ircclient::nick } {
00037         if [catch {
00038         ::irc::re
00039         } err] {
00040         puts "Error: $err"
00041         }
00042          ::ircclient = ::RELOAD 1
00043     }
00044     }
00045 }
00046 
00047 $cn registerevent KICK {
00048     puts "[who] KICKed [target 1] from [target] : [msg]"
00049 }
00050 
00051 puts " done"

Generated on 21 Sep 2010 for Gui by  doxygen 1.6.1