This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Birdy (OAuth, Twitter, Tweets&MegaHAL v6.01d) Jun12,2013

Support & discussion of released scripts, and announcements of new releases.
Post Reply
c
cypher1
Voice
Posts: 2
Joined: Mon Oct 10, 2011 4:58 pm

Post by cypher1 »

First things first

Many thanks for a great script its areally nice.

Now to the bread and butter of the post, i'm looking to secure the bot as i don't want every random posting tweets, i have set it to require the n flag within eggdrop but i was looking to remove the channel access requirement so that only people with the n flag could post but not just give access to people with OP on the irc channel, can this be done?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

cypher1 wrote:First things first

Many thanks for a great script its areally nice.

Now to the bread and butter of the post, i'm looking to secure the bot as i don't want every random posting tweets, i have set it to require the n flag within eggdrop but i was looking to remove the channel access requirement so that only people with the n flag could post but not just give access to people with OP on the irc channel, can this be done?
Sure that is entirely possible..

Code: Select all

# what modes can people temporarily tweet with
# these are channel modes, not flags on the bot
# you can use op, voice, or both, or "".
# (list)
set twitter(channel) [list "op" "voice"]
Change the last line to: set twitter(channel)
  • Code: Select all

    # the binds, change these if you want to
    bind pub - !twitter proc:twitter
    bind pub - !tweet proc:tweet
    bind pub - !private proc:private
    bind pub - !myfriends proc:twitter:friends
    bind pub - !myprofile proc:twitter:user
    bind pub - !myhome proc:twitter:home
    bind pub - !public proc:twitter:public
    bind pub - !mymentions proc:twitter:mentions
    bind pub - !mymessages proc:twitter:messages
    bind pub - !myprivates proc:twitter:privates
    bind pub - !tsearch proc:twitter:search
    bind pub - !user proc:twitter:user2
    bind pub - !rate proc:twitter:rate
    bind pub - +follow [list proc:twitter:dofollow "follow"]
    bind pub - -follow [list proc:twitter:dofollow "unfollow"]
    bind pub - +service [list proc:twitter:service "Added"]
    bind pub - -service [list proc:twitter:service "Removed"]
    bind pub - !services  [list proc:twitter:service ""]
    bind pub - !friends [list proc:twitter:restlist "following"]
    bind pub - !followers [list proc:twitter:restlist "followers"]
    bind evnt - prerehash proc:twitter:save
    bind pub - +app [list proc:twitter:apps "Added"]
    bind pub - -app [list proc:twitter:apps "Removed"]
    bind pub - !apps  [list proc:twitter:apps ""]
    bind pub - +track [list proc:twitter:track "Added"]
    bind pub - -track [list proc:twitter:track "Removed"]
    bind pub - !track  [list proc:twitter:track ""]
    bind pub - !RTofme proc:twitter:rtome
    bind pub - !RTbyme proc:twitter:rtbme
    bind pub - !RTtome proc:twitter:rttme
    bind pub - !RT proc:twitter:retweet
    Change the - above in all of those "bind pub" to an n
c
cypher1
Voice
Posts: 2
Joined: Mon Oct 10, 2011 4:58 pm

Post by cypher1 »

Awesome thanks :)
t
tonsit
Voice
Posts: 4
Joined: Sat Nov 12, 2011 12:07 am

Post by tonsit »

My bot performs the .die command and tells me:
This script requires the OAuthSingle package, it _cannot_ be used alone.

I've tried adding the original oauth.tcl script, and I've installed the packages in the readme.

What am I doing wrong?
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

tonsit wrote:My bot performs the .die command and tells me:
This script requires the OAuthSingle package, it _cannot_ be used alone.

I've tried adding the original oauth.tcl script, and I've installed the packages in the readme.

What am I doing wrong?
Follow this advice exactly. You should have no problems then. ;)
t
tonsit
Voice
Posts: 4
Joined: Sat Nov 12, 2011 12:07 am

Post by tonsit »

thanks, i'm not sure how/why I did it, but I only downloaded twitter.tcl and not the .zip with the other files. I started reading through all the posts and found the .zip along the way and now its working. oops.
t
tonsit
Voice
Posts: 4
Joined: Sat Nov 12, 2011 12:07 am

Post by tonsit »

the commands all seem to work, and last night the only issue I saw was in the msg sent to my irc channel there are strange number strings present before @user

[12:59] <@GamBot> Sam Letram: <Gamblore> I updated my icon! ( 135233287240155136@Gamblores - 12h, 7m, 10s ago via SerenityMegahal )

Are they supposed to be there?

Since getting up today and looking at logs i'm also getting an error that wasn't present last night:

[13:03:03] OAuth failed: (403) Error: status is a duplicate.; Request: /1/statuses/update.json ( ok )
[13:03:03] (Megahal) GamBot replied to (gamblores) accounts.
t
tonsit
Voice
Posts: 4
Joined: Sat Nov 12, 2011 12:07 am

Post by tonsit »

ok, so the number string was easily removed when i went in and removed %id%.
the errors cleared up after i deleted twitter.dat
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

tonsit wrote:the commands all seem to work, and last night the only issue I saw was in the msg sent to my irc channel there are strange number strings present before @user

[12:59] <@GamBot> Sam Letram: <Gamblore> I updated my icon! ( 135233287240155136@Gamblores - 12h, 7m, 10s ago via SerenityMegahal )

Are they supposed to be there?
Yes. Those are supposed to be there. That is the tweet ID. How else can you reply to someone's exact tweet without that??!

A tweet that mentions a person goes like this:
!tweet @Gamblores HI
A tweet that mentions a person and references the exact tweet they made goes like this:
!tweet 135233287240155136@Gamblores HI
For example, below the %ID% is required. You cannot reply-to users tweets without it.
<sp33chy> G4TV: Have you ever felt the absolute need to unleash your rage on Creepers in Minecraft? You're not alone: http://t.co/bm78OEZA ( 134903251668713472@g4tv - 1s ago via HootSuite )
<@SinR> !tweet 134903251668713472@g4tv Not really, I really don't like Minecraft, cause theres no point at all in playing
<sp33chy> Tweet created: http://twitter.com/suqmuhnutz (reply to 134903251668713472@g4tv) ( 134903818071707649@suqmuhnutz - 0s ago via bittersweet )
You can see the difference by clicking here. Notice that on that page is the tweet, along with the original reference. This is known as a "reply-to" ID tweet. It shows you the tweet that the reply references. If you remove %ID% you will never be able to do these. This is how the script works ID@user

tonsit wrote:Since getting up today and looking at logs i'm also getting an error that wasn't present last night:

[13:03:03] OAuth failed: (403) Error: status is a duplicate.; Request: /1/statuses/update.json ( ok )
[13:03:03] (Megahal) GamBot replied to (gamblores) accounts.
Your megahal bot is very new. It isn't generating unique text. Twitter doesn't like you to repeat a recent status update. Your bot, since it is a recently new megahal, doesn't have alot of different text to reply with. So is replying to tweets it sees with a duplicate status update. That error tells you this. Clearing twitter.dat fixes it because this forces the script to re-attain all of its last-id's and makes it forget everything.
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

hey


keep getting the following when i try send a tweet

Code: Select all

[15:13] <TwitterBot> [18:13:00]  unable to convert date-time string "2011-11-25 18:13:00 MSK": syntax error (characters 19-22)

Solved this issue
b
blake
Master
Posts: 201
Joined: Mon Feb 23, 2009 9:42 am
Contact:

Post by blake »

Hey


Any chance of getting something like this for facebook
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

blake wrote:Hey


Any chance of getting something like this for facebook
I've never used facebook. I'm betting the best you could relay would be wall updates, and possibly "likes". But I can see "likes" having the potential of unusefulness and being a spam potential.

When you say "something like this", in terms of facebook, what do you mean exactly? Twitter lends an obviousness to it's usefulness. With facebook I can't tell what exactly would be useful in an iRC context. Facebook is picture based primarily.

The twitter script was developed and steered over the course of 2 years. I knew nothing of twitter when I started and now I know more than I ever wish I did. ;)

So I guess what I'm asking, since you brought it up. Twitter and Facebook are not the same. So what is very elegant to do with twitter, this script, will be very hard to mirror using facebook. Thats all I mean.. ;)

But... What are you ideas for it? As remember, I have no idea how facebook works.. So give your ideas in a context that keeps this in mind.. ;D

and blake, one final piece of advice.. heh
http://forum.egghelp.org/viewtopic.php?t=17556&start=60
That url, explains entirely the setup. If you read beyond that initial post down into the thread from that point on. It explains any issues the new oauth requirement have caused and explains precisely how to fix them. If you have any issues with signature generation or timestamp durations appearing correct refer to this as the documentation. That's all there really is. I've never taken the time to document a users guide for birdy. Thats likely what is needed for more users to take advantage of twitter on their eggdrops. Alot figure it's too much hassle to setup. When the reality is, its a setup once and done. The steps are outlined clearly. Its actually a very very simple script, twitter.tcl. The complicated script is oauth.tcl. But you only ever touch the settings within oauth.tcl when you have issues. 90% of users won't have issues. ;D
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

Hey speechless,

Wondering if there is a tutorial for the part where you need to make an app on http://dev.twitter.com for the twitter script?
Idling at #Football, Quakenet.
User avatar
Trixar_za
Op
Posts: 143
Joined: Wed Nov 18, 2009 1:44 pm
Location: South Africa
Contact:

Post by Trixar_za »

Football: http://forum.egghelp.org/viewtopic.php?t=17556&start=60 explains it pretty well, or atleast I could do it after reading it.
F
Football
Master
Posts: 205
Joined: Fri Dec 26, 2008 3:08 pm
Location: Quakenet, #Football

Post by Football »

A Suggestion: How about if when you type !twitter <username> it will also inform you if the user is following you or not and if you are following him.

i.e:

<User> !twitter IRCFootball
Name: IRC Football; location: #Football @ IRC Quakenet; Following: 2,885; Followers: 2,713; Listed: 23; Total Tweets: 1,464. Following: No.
Follows You: YES.
Idling at #Football, Quakenet.
Post Reply