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.

Help with TCL Script to say msg channel

Old posts that have not been replied to for several years.
Locked
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Help with TCL Script to say msg channel

Post by pilot1 »

Ok, I know virtually nothing about eggdrop scripting..
What I want is when you send a message to the eggdrop with something like
"!say bob smells" the eggdrop performs the command "/msg $chan bob smells"

Can anyone write me a simple script for this? :D
And tell me how to install it?
Thanks!
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

I don't see an edit button so...

Ok, I figured out the command to do that would be
".dump PRIVMSG #channel whatever your saying" on the DCC chat.
How can I make a TCL script where "!say yada yada" tells the eggdrop to do ".dump PRIVMSG #channel yada yada"?

I just need !say to work in the channel.. if it doesn't work in a PM/notice/ctcp that's fine.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Code: Select all

bind msg m say pub:say

proc pub:say { nick uhost hand text } { 
if {[llength [split $text]] < 2} {
  putserv "PRIVMSG $nick :\002Usage\002: say #channel text"
return }
set channel [lindex $text 0]
set msg [lrange $text 1 end]
if {![validchan $channel] || ![botonchan $channel]} {
  putserv "PRIVMSG $nick :I'm not monitoring $channel or I'm not there."
return }
putserv "PRIVMSG $channel :$msg"
}
Once the game is over, the king and the pawn go back in the same box.
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

Thanks, just one problem though..
It lets me do the say command, but it won't let anyone else.
Do you have any idea how to fix that? I want *everyone* to have access to it.
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

change this:

Code: Select all

bind msg m say pub:say
to this:

Code: Select all

bind msg - say pub:say
Elen sila lúmenn' omentielvo
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

Thanks, that works perfectly.

Could you also please give me the code to do the same thing, except do it on the word "action" and do a /me action instead of messaging the channel with it?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

bind msg - say pub:say

to

bind msg - action pub:say

and

putact $channel $msg

instead of the putserv

and if you're going to use both the msg&act scripts, rename all instances of pub:say (in the act script) to pub:act
photon?
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

Thanks, it works.
Locked