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.

Is there a bind for private actions?

Old posts that have not been replied to for several years.
Locked
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Is there a bind for private actions?

Post by awyeah »

We all know to trigger an action (/me) in
a channel we can use a bind like:

Code: Select all

bind ctcp - ACTION my:procedure:here
And we also know to trigger a message in
private, with a bind like:

Code: Select all

bind msgm - * my:procedure:here

But is there a bind... or can we create a bind
similarly for a PRIVATE ACTION? (in query)

If anybody here knows please let me know.
I am creating a private spam detector script
I have binded for private messages and private
notices but don't have any idea for private actions.
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
p
pnp

Post by pnp »

You can bind to the ctcp action event, but check the destination if it's a channel or a nick.

Borrowed from http://www.baschny.de/eggdrop/faq/faq-f.html

Code: Select all

bind ctcp - "ACTION" action_proc
Sent to the bot privately:

Code: Select all

proc action_bind { nick uhost hand dest keyword text } {  
	if {[string index $dest 0] == "#"} { return 0 }
	...
}
Sent to a channel:

Code: Select all

proc action_bind { nick uhost hand dest keyword text } {  
	if {[string index $dest 0] != "#"} { return 0 }
	...
}
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Ah thanx... thats a smiliar kind logic I use to differentiate between private notices and channel notices.

For private notices something like:

Code: Select all

if {($dest == $botnick)} {
...........
...........
}

And maybe for channels the same like:

Code: Select all

if {($dest != $botnick) && (string match -nocase "#*" $dest)} {
...........
...........
}
Thanx I'll give it a try and let you know! 8)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
Locked