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 

be_acro bug

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
Torrevado
Op


Joined: 02 Aug 2006
Posts: 101

PostPosted: Tue Jul 14, 2009 8:06 am    Post subject: be_acro bug Reply with quote

Hi,
be_acro.tcl allows voting before the game (play round) is finished, so it makes the script unusable.
I think here it's the problem:
Code:
putmsg $chan "Time is up!"
  if {$totacro > 2} {
    set fs [open $acrovotes w+]

This makes possible start voting once 3 acros are submitted instead of allowing it after acro time is over. How to fix it?

Author's note about the script Very Happy :

Quote:
# THIS IS BUGFREE CODE !!!!!!! IF YOU FIND BUGS IT IS BECAUSE I PUT
# THEM IN ON PURPOSE !! IT'S NOT A BUG! TRUST ME!


Well, here it's the whole acro end round proc:
Code:
proc acroendround {chan} {
  global acrovotes acrocurrent acropeople acrorunning botnick acrotimerid
  set fo [open $acropeople r]
  set totacro -1
  while {![eof $fo]} {
    gets $fo _temp
    incr totacro
  }
  putmsg $chan "Time is up!"
  if {$totacro > 2} {
    set fs [open $acrovotes w+]
    close $fs
    set fa [open $acrocurrent w+]
    close $fa
    putmsg $chan "\002Current Acros:\002"
    set fs [open $acropeople r]
    set acnt 1
    while {![eof $fs]} {
      set acro(line) [lrange [split [gets $fs] " "] 1 end]
      if {$acro(line) != ""} {
        set numbah "\002\[$acnt\]\002 \0039,1"
        putmsg $chan "$numbah $acro(line) "
      }
      incr acnt 1
    }
    set totalacros -1
    set fs [open $acropeople r]
    while {![eof $fs]} {
      gets $fs temp_
      incr totalacros 1
    }
    close $fs
    set votesecs [expr ((30 + (($totalacros -3) * 5)) + ($totalacros * 2)) + 4]
    putmsg $chan "Start voting !! You have \002[expr ($votesecs - ($totalacros * 2)) -4]\002 seconds. Use the form \037/MSG $botnick NUMBER\037 to submit a vote."
    bind msgm -|- * acro:msg
    set acrotimerid [utimer [expr $votesecs -10] "acrowarningvote $chan"]
  } else {
    putmsg $chan "Sorry, not enough players this round! New round starts in 15 seconds."
    unbind msgm -|- * acro:msg
    set fp [open $acrocurrent w+]
    close $fp
    set acrotimerid [utimer 15 "startacro ooga ooga ooga $chan newround"]
    set acrorunning 0
  }
}
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 -> Script Support & Releases 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