| View previous topic :: View next topic |
| Author |
Message |
pasingh Voice
Joined: 22 Mar 2010 Posts: 2
|
Posted: Mon Mar 22, 2010 6:33 am Post subject: I want to send message to IRC channel from shell script. |
|
|
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  _________________ Thanks
Pankaj |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Mar 22, 2010 11:18 am Post subject: |
|
|
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 |
|
 |
pasingh Voice
Joined: 22 Mar 2010 Posts: 2
|
Posted: Mon Mar 22, 2010 12:53 pm Post subject: |
|
|
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 |
|
 |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Wed Mar 24, 2010 5:09 pm Post subject: |
|
|
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 |
|
 |
dopeghoti Voice
Joined: 29 Mar 2010 Posts: 3
|
Posted: Mon Mar 29, 2010 6:03 pm Post subject: |
|
|
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 |
|
 |
Darien Voice
Joined: 23 Apr 2010 Posts: 3
|
Posted: Fri Apr 23, 2010 11:04 pm Post subject: |
|
|
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 |
|
 |
|