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.

Binds with more than one word and a wildcard....

Help for those learning Tcl or writing their own scripts.
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

the handle is there....
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Strange, since it's properly identified, the lastseen timestamp should've been updated. If you enable public chat on your console (.console +p), do you see the echobot talking through your console?
NML_375
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

yes i see it talking

Code: Select all

.channel 
 
NICKNAME             HANDLE     JOIN        IDLE  USER@HOST
@Germanfunserver       germanfun  ---  O            germanfuns@gtanet....                                    

Code: Select all

.whois germanfuns

HANDLE    PASS NOTES FLAGS           LAST
germanfun  no   0     fghlopBQ        never (nowhere)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Then, if you can see the bots chatter in the console/dcc-partyline, it pretty much falls down to improper bindings..

Only other things I could think of, would be some other binding blocking, or possibly some ignore been added.
NML_375
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

ooh...I found my mistake :? :
The echo bot writes the names of the talkers bold...

it worked with \002 in the bind :D

last question:
how to integrate [] into the binding?

[*] gives an error message...
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Enclose the mask with {} to prevent any further parsing of the content (including command replacement [], variables $ and similar)

ie: bind pubm - {% some text*} theproc
NML_375
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

hmm...the bot reacts now, BUT...

Code: Select all

bind pubm " ??? \002Nimos\002 test" testproc

proc testproc {nick host chan args} {
putquick "privmsg $chan : Test Successfull! ($args)"
returns

Code: Select all

* Thirildragon * Test Successfull(#germanfunserver {[3] <Nimos> test 123}) 
why is there so much in $args?
I want only the "123" in the variable...[/code]
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

args is a special variable, you really should'nt use it unless you know what you're doing...

Use something like this:

Code: Select all

proc testproc {nick host hand chan text} {
 set newtext [join [lrange [split $text] 2 end]]
 puthelp "PRIVMSG $chan :Test Successfull! ($newtext)"
}
NML_375
N
Nimos
Halfop
Posts: 80
Joined: Sun Apr 20, 2008 9:58 am

Post by Nimos »

thank you!
s
spijon
Voice
Posts: 33
Joined: Sun Aug 27, 2006 9:55 pm

Post by spijon »

Is there a way so the wildcard/string only react when two words are used in a sentence.

ex: bind pubm - "% *text text2*" test:msg
"my text blalba text2" and and noget only on text or text2.
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

spijon:
I would probably try something like this:

Code: Select all

bind pubm - "% *text*text2*" test:msg
bind pubm - "% *text2*text*" test:msg
NML_375
Post Reply