| Revision 55,
450 bytes
checked in by lenny, 8 years ago
(diff) |
|
|
| Rev | Line | |
|---|
| [55] | 1 | #!/usr/local/bin/tclsh |
|---|
| 2 | |
|---|
| 3 | package require irc |
|---|
| 4 | |
|---|
| 5 | ::irc::config logger 1 |
|---|
| 6 | ::irc::config debug 1 |
|---|
| 7 | |
|---|
| 8 | set server "irc.gnaa.us" |
|---|
| 9 | set nick "urand" |
|---|
| 10 | set chan "#gnaa" |
|---|
| 11 | |
|---|
| 12 | set c [::irc::connection] |
|---|
| 13 | |
|---|
| 14 | proc play_rand {} { |
|---|
| 15 | |
|---|
| 16 | set fd [open /dev/urandom r] |
|---|
| 17 | $::c privmsg $::chan [read $fd 70] |
|---|
| 18 | close $fd |
|---|
| 19 | |
|---|
| 20 | after 1000 play_rand |
|---|
| 21 | } |
|---|
| 22 | |
|---|
| 23 | # End of motd |
|---|
| 24 | $c registerevent 376 { |
|---|
| 25 | |
|---|
| 26 | cmd-join $::chan |
|---|
| 27 | play_rand |
|---|
| 28 | } |
|---|
| 29 | |
|---|
| 30 | # Connect |
|---|
| 31 | $c connect $server |
|---|
| 32 | $c user $nick h d e |
|---|
| 33 | $c nick $nick |
|---|
| 34 | |
|---|
| 35 | vwait forever |
|---|
Note: See
TracBrowser
for help on using the repository browser.