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.

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

General support and discussion of Eggdrop bots.
Post Reply
p
pasingh
Voice
Posts: 2
Joined: Mon Mar 22, 2010 6:22 am

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

Post by pasingh »

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 :cry:
Thanks
Pankaj
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

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
p
pasingh
Voice
Posts: 2
Joined: Mon Mar 22, 2010 6:22 am

Post by pasingh »

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
T
Torrevado
Op
Posts: 101
Joined: Wed Aug 02, 2006 6:29 pm

Post by Torrevado »

In your bot.conf:

Code: Select all

# 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:
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".
d
dopeghoti
Voice
Posts: 3
Joined: Mon Mar 29, 2010 5:55 pm

Post by dopeghoti »

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: Select all

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.
D
Darien
Voice
Posts: 3
Joined: Fri Apr 23, 2010 10:59 pm

Post by Darien »

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!
Post Reply