Posted to tcl by Jack at Mon Jan 23 20:38:13 GMT 2023view raw

  1. package require http
  2. package require tls
  3.  
  4. bind pub - "!post" send:post
  5.  
  6. http::register https 443 [list ::tls::socket -tls1 1]
  7.  
  8. proc send:post { nick uhost hand chan text } {
  9.  
  10. #I need post the "text" value
  11.  
  12. set value $text
  13.  
  14. dict set params nick value
  15. set urlBase "https://example.com/"
  16. set req [::http::geturl $urlBase -query [http::formatQuery {*}$params]]
  17. set rec [::http::data $req]
  18.  
  19. putserv "PRIVMSG #admin Debug: $params - $rec"
  20.  
  21. }