pastebin_t: Pastes Given Text
Code: Select all
proc pastebin_t t {return [exec echo $t | nc termbin.com 9999]}
Code: Select all
bind pub - !paste paste
proc paste {n u h c t} {putserv "PRIVMSG $c :[pastebin_t $t]"}
Code: Select all
proc pastebin_f f {return [exec cat $f | nc termbin.com 9999]}
Code: Select all
set file "/home/user/botdir/file.txt"
putserv "PRIVMSG #channel :[pastebin_f $file]"
Code: Select all
package require http
proc tinyurl url {
set token [::http::geturl http://tinyurl.com/api-create.php?url=$url]
return [::http::data $token]
::http::cleanup $token
}
Code: Select all
bind pubm - "% !tinyurl *" cmd_tinyurl
proc cmd_tinyurl {n u h c t} {
putquick "PRIVMSG $c :[tinyurl [lindex [split $t] 1 ]]"
}