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.

ansa.tcl does not work properly

Help for those learning Tcl or writing their own scripts.
Post Reply
l
liloshell
Voice
Posts: 2
Joined: Wed Aug 25, 2010 7:47 am

ansa.tcl does not work properly

Post by liloshell »

Hallo everybody,

Here I have a question regarding the recent deprecation of putdccraw and the sintyax of the new putdcc or putdccnow.

The script i was using contains :

Code: Select all

proc ansa:send { str } {
	set str "$str\n"
	putdccraw 0 [string length $str] $str
}
I do not know the exact sintyax for use putdcc or putdccnow instead of
putdccraw.

here an eggdrop dcc message: Tcl error [ansa:request]: putdccraw is deprecated. Please use putdcc/putnow instead.

Please let me know.

Thank you everybody. :)
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Try reading the doc/tcl-commands.doc file..
doc/tcl-commands.doc wrote:| putnow <text> [-oneline]
| Description: sends text to the server immediately, bypassing all queues.
| Use with caution, as the bot may easily flood itself off the server.
| Options:
| -oneline: send text up to the first \r or \n, discarding the rest
| Returns: nothing
| Module: server
NML_375
l
liloshell
Voice
Posts: 2
Joined: Wed Aug 25, 2010 7:47 am

Post by liloshell »

dear friend, you gave me a good spot to correct the ansa.tcl


using this code :

Code: Select all

proc ansa:send { str } {
	set str "$str\n"
	putnow $str -oneline
}
instead of the older one the tcl is now working.

I am still testing if nothing is lost cutting the part of the code....

Thank's a lot. :D
M
MIODude
Voice
Posts: 32
Joined: Mon Oct 09, 2006 6:26 pm

Post by MIODude »

Sorry to resurrect an old thread - but I'm getting the exact same error.. but, i'm not using putdccraw! I'm using putnow

I tried his code below exactly as is, and I still get the same error.. I recently just updated the bot from 1.6.9 to 1.6.20. Is there something else that would generate this error?

Code: Select all

proc ansa:send { str } { 
   set str "$str\n" 
   putnow $str -oneline 
}


edit: AAAhh.. stupid me.. i had other scripts with the procedure called putnow that was calling the putdccraw command... ok.. fixed
Post Reply