test.tcl 653 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. bind pub - .send test:send
  2. bind bot - test_receive test:receive
  3. proc test:put_chan {chan text} {
  4. puthelp "PRIVMSG $chan :$text"
  5. }
  6. proc test:send {nick mask hand chan text} {
  7. putlog "test send: $text"
  8. putallbots "test_receive $chan $text"
  9. }
  10. proc test:receive {from_botnick cmd sent_data} {
  11. set data1 [lindex $sent_data 0]
  12. set data2 [lrange $sent_data 1 end]
  13. putlog "test receive: $sent_data"
  14. putlog "test data1: $data1"
  15. putlog "test data2: $data2"
  16. test:put_chan #quad.tc "from $from_botnick: $sent_data"
  17. # mnet:put_local_netmessage $network $name $chan $rec_nickname $rec_channel $rec_text
  18. }
  19. putlog "tester loaded"