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.

snotice + bind ctcr

Old posts that have not been replied to for several years.
Locked
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

snotice + bind ctcr

Post by misterys »

hi...
i have a problem with a tcl,

Code: Select all

bind raw - notice ctcpfinger
bind ctcr - FINGER ctcpreply
proc ctcpfinger {from key text} { 
if {[string match "*connecting*" $text] } { 
set text [split $text] 
set nickname [lindex $text 8] 
putserv "PRIVMSG $nickname :\001FINGER\001" 
} 
} 
 
proc ctcpreply {nick uh hand dest key arg} { 
if {[string match -nocase "*Java*" $arg]} { 
putserv "PRIVMSG misterys :blabla"
} 
} 
problem is:
when i bind the "connection snotice" from the server when a user connect, i dont get the finger reply.
if i bind join, the script is working...
running eggdrop1.6.10 and Tcl 8.3.2.


what can i do ? where is the error ?
btw... how to do that i just get a msg when the bot DONT geht the Finger reply "*java*" ??

i hope that s.o. can help me *g
and sorry for my bad english ;)

mfg
misterys
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Are yolu sure teh RAW bind is matching.
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

i think yes, i searched here how to bind snotices...
connect and kill notices are both snotices, so i think it's right...
or do u know an other way how to bind them ?

misterys
User avatar
BarkerJr
Op
Posts: 104
Joined: Sun Mar 30, 2003 1:25 am
Contact:

Post by BarkerJr »

Add a 'putlog $nickname' to ctcpfinger just to be sure it's working :)
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

it works *g now the bot floods my partyline *g
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

hmm no one else an idea how to do ?
or does anyone knows an alternative way how to realize this script ?

still in hope ;)
misterys
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

You stated it is now working, oh well.

Code: Select all

if {[string match "*connecting*" $text] } {
This line must be failing, if no CTCP is being returned.

Other options include, the client has connected completly, when the CTCP is sent.

You may want to send the message using a timer, set to 5 second, to make sure the connection is completed.
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

sorry *g that was my fault...

... but atm i tinkt i'm to stupid for this tcl
*banging head on the table*

fact is, the client recives the ctcp, so i think, he _must_ at last reply when there is enough bandwich. the client gets the finger request at the same time when he is requested to identify hisself at nickserv and when u get this notice, he's ready with connecting ( in my opinion )

or am i just to stupid for this *g
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

What are you trying to do exactly?
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

hi....

the tcl should should bind the snotices from the server when a user connects and finger him. ( it's clear that the bot has ne right userflags to recive the snotices)

the finger reply should the bot msg to my query if it does not contain a special word, in this case "*eggdrop*" ...

i hope it's clear... sorry again for bad english :( i must lern more :oops:

mfg
misterys
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Code: Select all

proc ctcpreply {nick uh hand dest key arg} { 
  if {![string match -nocase "*eggdrop*" $arg]} { 
    putserv "PRIVMSG misterys :blabla" 
  } 
}
The ! in front of [string ...] will make it only work if it does not match.

Also put a return 0 at the end of your ctcpfinger proc.
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

Code: Select all

####		binds
bind raw - notice ctcpfinger
bind ctcr - "FINGER" ctcpreply

####		ctcp on connect
proc ctcpfinger {from key text} { 
if {[string match "*connecting*" $text] } { 
set text [split $text] 
set nickname [lindex $text 8] 
putserv "PRIVMSG $nickname :\FINGER\001" 
putlog "$nickname connected"
return 0
} 
} 

####		ctcp reply + action
proc ctcpreply {nick uh hand dest key arg} { 
  if {![string match -nocase "*eggdrop*" $arg]} { 
    putserv "PRIVMSG misterys :kljsdfjl" 
  } 
} 
hmm same result as before, i don't get a query when a user connects with a different version... that's the main problem
:( misterys
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Code: Select all

####    binds 
bind raw - notice ctcpfinger 
bind ctcr - "FINGER" ctcpreply 

####    ctcp on connect 
proc ctcpfinger {from key text} { 
  if {[string match "*connecting*" $text] } { 
    set text [split $text] 
    set nickname [lindex $text 8] 
    putserv "PRIVMSG $nickname :\FINGER\001" 
    putlog "$nickname connected" 
  }
  return 0
} 

####    ctcp reply + action 
proc ctcpreply {nick uh hand dest key arg} {
  putlog "ctcp reply $key from $nick: $arg"
  if {![string match -nocase "*eggdrop*" $arg]} { 
    putserv "PRIVMSG misterys :kljsdfjl" 
  }
  return 0
}
See what that says now.
m
misterys
Voice
Posts: 23
Joined: Sun Mar 30, 2003 2:43 pm

Post by misterys »

well ....
i still don't get a query wenn a user connect with a different finger reply....


:cry: :cry: :cry: :cry: :cry: :cry: :( :(
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

==> putlog "ctcp reply $key from $nick: $arg"

Did it say that in your log? That's what I meant. I want to see if it's even getting the reply.

Also, do you see the ctcp reply itself on the partyline?
Locked