kxng wrote:Thanks for the explanation
I want to have the RT from friends-timelines, are there an option i've missed ? I searched a little but i'm not good at tcl :/
Not the RT when you say RT @user, but the RT when you click on "retweet"
This is easily accomplished. The script just doesn't natively do that because it's usually quite spammy. But if you want it you can easily add it yourself. Let me show you how:
Within "proc:twitter:restapi" procedure, find:
Code: Select all
if {[string match "otheruser*" $type]} {
if {![string length [string trim [set who [string map {" " "_"} [join [lrange [split $type] 1 end]]]]]]} { set who "$tuser" }
set other "?[http::formatQuery screen_name $who]"
set q [list [list "screen_name" "$who"]]
set type "user"
} elseif {![string match "search*" $type]} {
set other ""
set q ""
} else {
if {![string length [string trim [set who [join [lrange [split $type] 1 end]]]]]} { set who "$tuser" }
set other ""
set q [list [list q [oauth:uri_escape $who]]]
set type "search"
}
Change it to look like this:
Code: Select all
if {[string match "otheruser*" $type]} {
if {![string length [string trim [set who [string map {" " "_"} [join [lrange [split $type] 1 end]]]]]]} { set who "$tuser" }
set q [list [list "screen_name" "$who"] [list include_rts true]]
set type "user"
} elseif {![string match "search*" $type]} {
set q [list [list include_rts true]]
} else {
if {![string length [string trim [set who [join [lrange [split $type] 1 end]]]]]} { set who "$tuser" }
set q [list [list q [oauth:uri_escape $who]] [list include_rts true]]
set type "search"
}
This will _FORCE_ retweets to show in all restapi/search results. The variable "other" isn't required either. I've just left it there, as I migrated the script from basic authentication to full oauth. This is the reason you see it missing from my code change above. q contains the query to issue through oauth. This is a list, of lists, each sub-list containing a single name/value pair. This is to keep any special characters from being handled incorrectly. You can add more "entities" into the uri this way. There are alot that I don't make use of
kxng wrote:I translated your script to french, just for the putlog for now, if you're interested I can make a complete translation and pm the translated script
You can release your translated version in this thread as well, so can others. Only a few of the messages can be user-edited, mainly because I prefer clean functionality over ease of configurability. Alot of the messages are "hard-coded" in English because of this. So of course for other users benefit, feel free to share these translated copies, by all means. Even in this thread
BTW, to developers. oauth.tcl will work for _any_ eggdrop/tcl twitter script if you make a small (1/2 line) modification in your script where you presently use basic auth and http::geturl to do it. If you need help getting your script to do similar to this. I can show you how using the "oauth.tcl" this script includes. This is why it is included seperately
My twitter.tcl does not use "http::geturl", except when faking a web-browser and giving !twitter replies
, other than that though everything is handled implicitly through oauth as the application and user matching it's credentials.