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.

story teller

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

story teller

Post by hikaro »

is there something wrong with this code?
bind pub * !start join:story
proc join:story {nick uhost hand chan rest} {
slowmsg "story.txt"
}
proc slowmsg {file {pos 0}} {
set f [open $file]
seek $f $pos
if {[gets $f line]>-1} {
putserv "privmsg #channel :$line"
utimer 30 [list slowmsg $file [tell $f]]
} else {
utimer 29 [list putserv "Re-reading the story:"]
utimer 30 [list slowmsg $file]
}
close $f
}
because the bots in first 5 hours works very well... after that it just like flooding the channel... comes text like 2 secs perline...
before i think its from the shell and i changed it 3 times (different provider) its also the same...
anyone here can help me plz...
btw thx.. 8)
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

no one can help me?
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Does it happen when the bot rejoins the channel?
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

uhmm when the bot got excess flood it will like flooding the channel and got excess flood more and more...
i have tried 3 different good shell but its all the same...
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Hard to tell if it will work with the horrible formatting, and I didn't test it...

Code: Select all

bind pub * !start join:story
proc join:story {nick uhost hand chan rest} {
global story_timers
set story "story.txt"
if {![info exists story_timers($story)]} {
  slowmsg $story
} else {
  puthelp "privmsg $nick :already reading..."
}
}
proc slowmsg {file {pos 0}} {
global story_timers
set f [open $file]
seek $f $pos
if {[gets $f line]>-1} {
putserv "privmsg #channel :$line"
set story_timers($file) [utimer 30 [list slowmsg $file [tell $f]]]
} else {
utimer 29 [list putserv "Re-reading the story:"]
set story_timers($file) [utimer 30 [list slowmsg $file]]
}
close $f
} 
User avatar
hikaro
Halfop
Posts: 68
Joined: Wed Mar 10, 2004 4:29 am

Post by hikaro »

yeaaa it works really good!!!
thanks stdragon u r the best :wink:
Locked