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 

I want to send message to IRC channel from shell script.

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Eggdrop Help
View previous topic :: View next topic  
Author Message
pasingh
Voice


Joined: 22 Mar 2010
Posts: 2

PostPosted: Mon Mar 22, 2010 6:33 am    Post subject: I want to send message to IRC channel from shell script. Reply with quote

Hi All,

I want to send message to IRC channel from shell script, I have installed eggdrop bot on my Laptop, I want to sent message to a channel from my laptop.

Please help me !!!

Thanks Crying or Very sad
_________________
Thanks
Pankaj
Back to top
View user's profile Send private message Yahoo Messenger
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Mon Mar 22, 2010 11:18 am    Post subject: Reply with quote

There's no simple way of doing this using a shellscript...
You could however use the telnet client to connect to your eggdrop, and from there use the .say partyline command.
_________________
NML_375, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
pasingh
Voice


Joined: 22 Mar 2010
Posts: 2

PostPosted: Mon Mar 22, 2010 12:53 pm    Post subject: Reply with quote

oh ok, Thanks for reply, can you please explain me how can i telnet my eggdrop on specific port. where i need to change, or any good URL for the same. and how can i use .say party line.


Thanks
_________________
Thanks
Pankaj
Back to top
View user's profile Send private message Yahoo Messenger
Torrevado
Op


Joined: 02 Aug 2006
Posts: 101

PostPosted: Wed Mar 24, 2010 5:09 pm    Post subject: Reply with quote

In your bot.conf:
Code:
# You need to un-comment this line and change the port number in order to open
# the listen port. You should not keep this set to 3333.
listen YOURPORT all

Then, you'll need a telnet client like putty (Putty docs page here). You can also access the command console via DCC.
Take a look at http://www.egghelp.org/using.htm

Once you're connected to the bot:
Quote:
Use .help for basic help.
Use .help <command> for help on a specific command.
Use .help all to get a full command list.
Use .help *somestring* to list any help texts containing "somestring".
Back to top
View user's profile Send private message
dopeghoti
Voice


Joined: 29 Mar 2010
Posts: 3

PostPosted: Mon Mar 29, 2010 6:03 pm    Post subject: Reply with quote

If you really need to do an automated task from the commandline, you can do what I did and use Python's telnet library to do the telnetting for you:

Code:

import telnetlib

HOST="localhost"
PORT="3333"
BOTUSER="username"
BOTPASS="password"
CHANNEL="#channel"

def botcmd(b, command):
        return b.write("." + command + "\n")

bot=telnetlib.Telnet(HOST,PORT,60)
bot.read_until("ckname.")
bot.write(BOTUSER + "\n")
bot.read_until("word.")
bot.write(BOTPASS + "\n")
bot.read_until("joined the party line.",2)

botcmd (bot, "say " + CHANNEL + " Python interaction test.")
print "Check " + CHANNEL + " for test output."
botcmd (bot, "quit")
bot.close()


You can even make it interactive if you want, but at that point, you may as well telnet in yourself.
Back to top
View user's profile Send private message
Darien
Voice


Joined: 23 Apr 2010
Posts: 3

PostPosted: Fri Apr 23, 2010 11:04 pm    Post subject: Reply with quote

Hi folks,

I'm running Eggdrop v. 1.6.19. I can log in via putty without any issues, but whenever I try the .say command to get it to send a msg to an IRC channel that the bot sits in, I get the "What? You need .help!"

I tried .say partyline <txt> (though I wasn't sure how that was going to direct it to a particular channel)
and .say <channel> <txt>, both instances got me the error.

Any additional help/instruction on this would be greatly appreciated!
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 -> Eggdrop Help All times are GMT - 4 Hours
Page 1 of 1

 
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