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 

sending privmsgs from shell.

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
KeMiJohN
Voice


Joined: 10 Oct 2005
Posts: 1

PostPosted: Mon Oct 10, 2005 8:12 am    Post subject: sending privmsgs from shell. Reply with quote

is it possible to send a PRIVMSG from the linux shell?

or maybe make a shell script that is executed with 2 parameters, (nick and message) and then sends $message to $nick via a PRIVMSG?
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Mon Oct 10, 2005 10:15 pm    Post subject: Reply with quote

Code:

#!/bin/sh
# This line continues for Tcl, but is a single line for 'sh' \
exec tclsh "$0" ${1+"$@"}
set s [socket irc.server.com 6667]
puts $s "nick foo\nuser bar x x moo"
puts $s "privmsg [lindex $argv 0] :[join [lrange $argv 1 e]]"
puts $s quit
close $s

(this might not work on servers that send ping cookie on connect and expect reply, registering client upon receiving it)
_________________
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use [code] tag when posting logs, code
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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