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.

on whois msg chan

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

on whois msg chan

Post by opsb »

hi

I need script whick will msg chan setted in script when someone do whois on eggdrop

snotice is in format

Code: Select all

-irc.local.net- *** nick (ident@host) did a /whois on you.
And after receiving whois notice, PRIVMSG chan in format

nick (ident@host) just did a /whois on me.

Regards
User avatar
username
Op
Posts: 196
Joined: Thu Oct 06, 2005 9:20 am
Location: Russian Federation, Podolsk
Contact:

Post by username »

Try it:

Code: Select all

set wchan #yourchan
bind notc - * wproc
proc wproc {nick uhost hand text dest} { 
global wchan
    if {[regexp {(.*?) did a /whois.*?} $text - wwho]} {
        putserv "PRIVMSG $wchan :$wwho just did a /whois on me."
    }
}
Such scripts better to write using RAW.
Архив TCL скриптов для ботов Eggdrop/Windrop:
http://egghelp.ru/
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

Post by opsb »

thnx for trying but not working for me :(
User avatar
speechles
Revered One
Posts: 1398
Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)

Post by speechles »

Code: Select all

set wchan "#yourchan"

bind notc - * wproc

proc wproc {nick uhost hand text {dest ""} } {
	if {($dest == "" || [isbotnick $dest]) && [regexp {(.+?)\sdid a /whois} $text -> wwho]} {
		putserv "PRIVMSG $::wchan :$wwho just did a /whois on me."
	}
}
Greedy matching is needed in cases like this (.+? vs .*?) to contain as much of the line as possible. Also need to check the botnick is the one being sent the notice (the bot gets channel notices and without this check can set this script off erroneously).
o
opsb
Halfop
Posts: 41
Joined: Sat Sep 01, 2007 1:41 pm

Post by opsb »

Even your code wont work
User avatar
strikelight
Owner
Posts: 708
Joined: Mon Oct 07, 2002 10:39 am
Contact:

Post by strikelight »

For server notices, you will most likely need to use a raw binding.

Code: Select all

bind raw - NOTICE yourproc:rawnotice
See tcl-commands.doc for the paramaters a raw binding is called with.
Post Reply