egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Birdy (OAuth, Twitter, Tweets&MegaHAL v6.01d) Jun12,2013
Goto page Previous  1, 2, 3 ... 14, 15, 16 ... 19, 20, 21  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
ManNose
Voice


Joined: 01 Sep 2012
Posts: 9

PostPosted: Wed Sep 26, 2012 3:05 am    Post subject: Reply with quote

Does anyone have a good, understandable guide for installing MegaHAL? I have been looking through the internet, its very hard to understand and find a guide of how installing this module properly
Back to top
View user's profile Send private message
heartbroken
Op


Joined: 23 Jun 2011
Posts: 106
Location: somewhere out there

PostPosted: Wed Sep 26, 2012 9:47 am    Post subject: Reply with quote

hi ..
untar Barker.jr's megaHAL tar ball into eggdrop1.6.21/src/mod/
tar -xvjf megahal.mod.2.7.tar.bz2
and go back into eggdrop1.6.21 main directory.and compile with:
./configure
make config or make iconfig
make and make install DEST=/home/name/your-new-eggdrop
megaHAL has two remote scripts copy them into your new eggdrop/scripts directory with:
cp ~/eggdrop1.6.21/src/mod/megahal.mod/examples/respnickanywhere.tcl ~/your-new-bot/scripts/

cp ~/eggdrop1.6.21/src/mod/megahal.mod/examples/replyall.tcl ~/your-new-bot/scripts/

go into your new-eggdrop edit your new eggdrop.conf file .add two lines for these scripts like
source scripts/replyall.tcl
source scripts/respnickanywhere.tcl

and add a line for megahal modüle:
loadmodule megahal
start your new bot with : ./eggdrop -m eggdrop.conf
when your bot joins in introduce yourself to the bot /msg bot-nick hello and than /msg bot-nick pass your-pass
when you have join in partyline (telnet/dcc comminication with your eggdrop) type .chanset #channel-name +megahal for to activate megahal on your channel.
i don't suggest you to activate +learnall or +freespeak settings..thats it.good luck Smile
_________________
Life iS Just a dReaM oN tHE wAy to DeaTh
Back to top
View user's profile Send private message
ManNose
Voice


Joined: 01 Sep 2012
Posts: 9

PostPosted: Wed Sep 26, 2012 10:25 am    Post subject: Reply with quote

Can you link me to the script?
Back to top
View user's profile Send private message
heartbroken
Op


Joined: 23 Jun 2011
Posts: 106
Location: somewhere out there

PostPosted: Wed Sep 26, 2012 10:45 am    Post subject: Reply with quote

i removed file
_________________
Life iS Just a dReaM oN tHE wAy to DeaTh


Last edited by heartbroken on Wed Sep 26, 2012 12:28 pm; edited 2 times in total
Back to top
View user's profile Send private message
ManNose
Voice


Joined: 01 Sep 2012
Posts: 9

PostPosted: Wed Sep 26, 2012 11:37 am    Post subject: Reply with quote

hey, thanks for that - it works!

I have a problem though, the settings is to -freespeak

but he speaks all the time nonetheless.. why???
Back to top
View user's profile Send private message
heartbroken
Op


Joined: 23 Jun 2011
Posts: 106
Location: somewhere out there

PostPosted: Wed Sep 26, 2012 12:24 pm    Post subject: Reply with quote

well this is wierd. cus i already have an eggdrop its been running with megahal+birdy and settings are +megahal -learnall -freespeak and with these settings bot only responce when someone mention it bot's nick like hey bot-nick wass up etc..bot only answer these.otherwise nprmaly it shouldnt .. so i dont know why your bot acting like that...
_________________
Life iS Just a dReaM oN tHE wAy to DeaTh
Back to top
View user's profile Send private message
Ankara
Voice


Joined: 13 Oct 2012
Posts: 2

PostPosted: Sat Oct 13, 2012 4:48 pm    Post subject: Reply with quote

Looks like those wonderful new features are beginning to be implemented over at twitter. </sarcasm>

I see this now when my bot tries to update to twitter:

Code:
<botname>  OAuth failed: (404) that page does not exist</error> </errors>; <?xml version=1.0 encoding=utf-8?> <errors> <error code=34>sorry ( ok )

then followed by:
Code:

<botname> (Megahal) Botname replied to (twittername) accounts.]


It still seems to be working however, as my bot is answering people.
I believe this is due to one of the *special* changes they had planned for us evil app users.
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Oct 14, 2012 8:35 pm    Post subject: Reply with quote

Ankara wrote:
Looks like those wonderful new features are beginning to be implemented over at twitter. </sarcasm>

I see this now when my bot tries to update to twitter:

Code:
<botname>  OAuth failed: (404) that page does not exist</error> </errors>; <?xml version=1.0 encoding=utf-8?> <errors> <error code=34>sorry ( ok )

then followed by:
Code:

<botname> (Megahal) Botname replied to (twittername) accounts.]


It still seems to be working however, as my bot is answering people.
I believe this is due to one of the *special* changes they had planned for us evil app users.


Partly their fault, partly mine. All endpoints using twitter.com directly can no longer be used for API requests. (WHY?: This stops alot of spam bots and link harvesting bots.) This was my fault, because this was told to developers a long time ago, it's just that twitter never really "enforced" that policy until now, so why fix what isn't broken I never updated all the url's to compliance... oops

You can fix it by making sure ALL url's in the (# 2) --> URLS <--) section of the config are changed from:
Code:
set twitter(userxml) "http://twitter.com/statuses/user_timeline.xml"
set twitter(home) "http://twitter.com/statuses/home_timeline.json"
set twitter(mention) "http://twitter.com/statuses/mentions.json"
set twitter(mentionxml) "http://twitter.com/statuses/mentions.xml"


And modified to look like they are below instead:
Code:
set twitter(userxml) "http://api.twitter.com/1/statuses/user_timeline.xml"
set twitter(home) "http://api.twitter.com/1/statuses/home_timeline.json"
set twitter(mention) "http://api.twitter.com/1/statuses/mentions.json"
set twitter(mentionxml) "http://api.twitter.com/1/statuses/mentions.xml"


The API end-point of twitter.com must now be used for all requests and this is now enforced. This will stop the recurring 404 and page does not exist error from happening.

There will be a new version released soon that includes some bug-fixes, and other minor fixes. It will also make it easier to port to v1.1 of their API which I do intend on doing. So the script won't die per say... Perhaps I over exaggerated a bit. Wink
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
BigToe
Halfop


Joined: 30 Dec 2010
Posts: 99

PostPosted: Fri Jan 04, 2013 8:25 am    Post subject: Reply with quote

Hello

Can this script be modified so instead of displaying the tweets to the channel it will write down the tweets to a .txt file?
Back to top
View user's profile Send private message
BigToe
Halfop


Joined: 30 Dec 2010
Posts: 99

PostPosted: Sat Feb 09, 2013 7:43 am    Post subject: Reply with quote

Is that a no?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Feb 11, 2013 9:57 pm    Post subject: Reply with quote

BigToe wrote:
Is that a no?


Bro, I never saw the original post asking for help here. Assume we are all human and pobody is nerfect... Everything is possible, until it is attempted. At which point maybe something becomes impossible. So lets attempt...

Code:
               if {[string equal -nocase "friends" $type]} {
                  if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
                     if {![info exists skip]} {
                        putserv "$to :$tt" ; set sp 0
                     }
                     if {![info exists pure]} {
                        set twitter($tuser,lastidf) $id
                        set pure 0
                     }
                  }
               } else {


Find that chunk, and make that chunk into something like it is below...

Code:
               if {[string equal -nocase "friends" $type]} {
                  if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
                     if {![info exists skip]} {
                        if {![file exists "twitter-friends-$chan.txt"]} {
                           set file [open "twitter-friends-$chan.txt" w]
                        } else {
                           set file [open "twitter-friends-$chan.txt" a]
                        }
                        puts $file $tt ; set sp 0 ; close $file
                     }
                     if {![info exists pure]} {
                        set twitter($tuser,lastidf) $id
                        set pure 0
                     }
                  }
               } else {


Make sure to disable \n newlines in tweets (the option to do this is in the config) when using this hack. This will save all the "friends" automations. This isn't a perfect hack either. This open/closes the file several times in a row, which should be fine. But isn't the most economical solution. I have to rewrite this script to support v1.1 of twitter's oauth by march 21st or it will entirely die. So when spending time on birdy my focus will be on this goal rather than adding features. If you need @mentions hacked in to save to a file too, let me know.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
BigToe
Halfop


Joined: 30 Dec 2010
Posts: 99

PostPosted: Tue Feb 12, 2013 1:55 am    Post subject: Reply with quote

Thank you speechles, I will give it a try and see how it works - i will keep you posted.


I do not need the same feature for @Mentions, thanks.


What kind of new features were you thinking to add?
Back to top
View user's profile Send private message
BigToe
Halfop


Joined: 30 Dec 2010
Posts: 99

PostPosted: Tue Feb 12, 2013 5:12 pm    Post subject: Reply with quote

It worked speechles
Back to top
View user's profile Send private message
BigToe
Halfop


Joined: 30 Dec 2010
Posts: 99

PostPosted: Fri Feb 15, 2013 5:55 pm    Post subject: Reply with quote

speechles wrote:
BigToe wrote:
Is that a no?


Bro, I never saw the original post asking for help here. Assume we are all human and pobody is nerfect... Everything is possible, until it is attempted. At which point maybe something becomes impossible. So lets attempt...

Code:
               if {[string equal -nocase "friends" $type]} {
                  if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
                     if {![info exists skip]} {
                        putserv "$to :$tt" ; set sp 0
                     }
                     if {![info exists pure]} {
                        set twitter($tuser,lastidf) $id
                        set pure 0
                     }
                  }
               } else {


Find that chunk, and make that chunk into something like it is below...

Code:
               if {[string equal -nocase "friends" $type]} {
                  if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
                     if {![info exists skip]} {
                        if {![file exists "twitter-friends-$chan.txt"]} {
                           set file [open "twitter-friends-$chan.txt" w]
                        } else {
                           set file [open "twitter-friends-$chan.txt" a]
                        }
                        puts $file $tt ; set sp 0 ; close $file
                     }
                     if {![info exists pure]} {
                        set twitter($tuser,lastidf) $id
                        set pure 0
                     }
                  }
               } else {


Make sure to disable \n newlines in tweets (the option to do this is in the config) when using this hack. This will save all the "friends" automations. This isn't a perfect hack either. This open/closes the file several times in a row, which should be fine. But isn't the most economical solution. I have to rewrite this script to support v1.1 of twitter's oauth by march 21st or it will entirely die. So when spending time on birdy my focus will be on this goal rather than adding features. If you need @mentions hacked in to save to a file too, let me know.



Hey speechles - is it possible to add in addition to this the Date and time the tweet was written to the file at the end of each tweet?
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Sun Feb 17, 2013 3:41 am    Post subject: Reply with quote

BigToe wrote:
Hey speechles - is it possible to add in addition to this the Date and time the tweet was written to the file at the end of each tweet?


Sure...

Add this in the config section of the script:
Code:
# Add your timestring which the file saving portion will use
# to create it's timestamps
set twitter(filetimestring) {%Y-%m-%d %I:%M:%S%p}


Then change the code to what it looks like below:
Code:
              if {[string equal -nocase "friends" $type]} {
                  if {($twitter($tuser,lastidf) < $id && ![string equal -nocase $screen $tuser]) || ($twitter($tuser,lastidf) == $id && [info exists sp] && ![string equal -nocase $screen $tuser])} {
                     if {![info exists skip]} {
                        if {![file exists "twitter-friends-$chan.txt"]} {
                           set file [open "twitter-friends-$chan.txt" w]
                        } else {
                           set file [open "twitter-friends-$chan.txt" a]
                        }
                        puts $file "[clock format [clock seconds] -format $::twitter(filetimestring)] $tt" ; set sp 0 ; close $file
                     }
                     if {![info exists pure]} {
                        set twitter($tuser,lastidf) $id
                        set pure 0
                     }
                  }
               } else {

_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page Previous  1, 2, 3 ... 14, 15, 16 ... 19, 20, 21  Next
Page 15 of 21

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber