egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

ansa.tcl does not work properly

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
liloshell
Voice


Joined: 25 Aug 2010
Posts: 2

PostPosted: Wed Aug 25, 2010 7:58 am    Post subject: ansa.tcl does not work properly Reply with quote

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:

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. Smile
Back to top
View user's profile Send private message
nml375
Revered One


Joined: 04 Aug 2006
Posts: 2857

PostPosted: Wed Aug 25, 2010 10:01 am    Post subject: Reply with quote

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, idling at #eggdrop@IrcNET
Back to top
View user's profile Send private message
liloshell
Voice


Joined: 25 Aug 2010
Posts: 2

PostPosted: Fri Aug 27, 2010 2:23 pm    Post subject: Reply with quote

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


using this code :

Code:
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. Very Happy
Back to top
View user's profile Send private message
MIODude
Voice


Joined: 09 Oct 2006
Posts: 32

PostPosted: Mon Oct 04, 2010 8:59 pm    Post subject: Reply with quote

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:

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber