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.

Raw command for an action?

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:

Raw command for an action?

Post by pilot1 »

What is the raw command for an action? (By action I mean /me does whatever.)
I've tried everything I can think of..
Thanks
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Follow the template about control codes in the FAQ forum.
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

I looked at the formatting codes thread and couldn't find anything on how to do an action (/me in most clients) there, I looked at the links and according to the CTCP Protocol Specifications the command is "\001ACTION does the action.\001" but when I try to input that it doesn't work, probably because i'm not inputting it right..
I've tried the following commands in a DCC chat with the eggdrop:
.dump PRIVMSG #help :\001 tests the action.\001
.dump PRIVMSG #help \001 tests the action.\001
.dump #help \001 tests the action.\001
.dump CTCP #help \001 tests the action.\001
None of them gave any input, except the first two which did "\001 tests the action.\001" and "\001" respectively.
Does anyone know what i'm doing wrong?
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

This is because the "dump" command, doesn't translate the code as you wish.

You will have to physicaly send the control codes, via your telnet / irc client.

There is however, a ".act" command, that will do this for you in the partyline.
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

Thanks, I have a TCL script from this forum to do a PRIVMSG, is it possible to make a copy of it that does an action on the word 'action' intstead of a PRIVMSG on the word 'say'?
The scripts is below.

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"
}


I tryed changing it myself, but my TCL knowledge is severely limited.
Thanks!
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Code: Select all

bind msg m say pub:say
This is the line reponsible for setting up the event, that calls the script.

It comes in the format

Code: Select all

bind <type> <flags> <mask/trigger> <procedure name>
Thus, the mask/trigger here is "say", and is all that needs to be changed.
p
pilot1
Voice
Posts: 16
Joined: Sat Nov 16, 2002 11:17 am
Location: FL, USA
Contact:

Post by pilot1 »

But I also want it to do an action (/me) instead of a PRIVMSG, will changing say change that too?
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

putserv "PRIVMSG $chan :\001ACTION slaps $nick"
try that :)
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 »

Here's the code, but it still won't work.. any ideas?


bind msg - action pub:action

proc pub:action { nick uhost hand text } {
if {[llength [split $text]] < 2} {
putserv "PRIVMSG $nick :\002Usage\002: action #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 $chan :\001ACTION msg\001"
}

I tried using it with the \001 and without the \001 near the end of the code, also I want whatever they say after "action #channelname" to show up where msg is in \001ACTION msg\001 is that done right?
When I PM the bot with "action #scripts test" nothing happens..
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 - action pub:action 

proc pub:action { nick uhost hand text } { 
if {[llength [split $text]] < 2} {
putserv "PRIVMSG $nick :\002Usage\002: action #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 :\001ACTION $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 »

It works, Thanks! :D
Locked