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.

convert mirc script to tcl

Old posts that have not been replied to for several years.
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

yes i did and its flooding me on bot dcc.... i think the loop too fast
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Code: Select all

bind join - * join:story 
proc join:story {nick host hand chan} { 
  global botnick 
  if {$nick == $botnick} {
    slowmsg "story.txt" "$chan" 
  } 
} 

proc slowmsg {file chan {pos 0}} { 
  set f [open $file] 
  seek $f $pos 
  if {[gets $f line]>-1} { 
    putserv "privmsg $chan $line" 
    utimer 10 [list slowmsg $file [tell $f]] 
    } {
    slowmsg $file
  } 
  close $f 
}
Xpert.
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

Yess it works!! thanks a lot all for helping me
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

No problem :)
Xpert.
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

now i got another problem.. the script run well and i have the bot run more that 20 hours.. but now it seems like flooding the channel...
it type line by line not in 10 secs but perhaps 1 secs... so the bot got excess flood many times.
anyone knows why?? or the shell lag?? is there any lag checker then when the bots lag it will stop for 1 minute the msg then it will go on when its going normal
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Try to chagne the:

Code: Select all

utimer 10 [list slowmsg $file [tell $f]]
to:

Code: Select all

timer 1 [list slowmsg $file [tell $f]]
It will do the timer every 1 minute.
Xpert.
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

i did try this xper but i think its too long... the user may get bored because of waiting the bots
...
User avatar
Xpert
Halfop
Posts: 88
Joined: Mon Mar 08, 2004 7:03 am

Post by Xpert »

Hmmmm....
So, do it every 20 or 30 seconds :)
Xpert.
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

hahahha lol
i did it too -o and after a long time its also like flooding channel it msg every 3 secs i think... lol./..
i can get crazy of this script lol!
Locked