Skip to content

Commit

Permalink
Fix #280
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Jun 22, 2016
1 parent 579a73a commit 1f71256
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/Commands/CommandPoll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,7 @@ public override CommandResult OnExecute( ICommandSource src, ICommandArgs args )
return CommandResult.Success();
}

/// <summary>
/// An struct who represent an Poll
/// </summary>
public struct Poll
public class Poll
{
/// <summary>
/// List of player who voted
Expand Down Expand Up @@ -266,10 +263,10 @@ public void Start()
{
EssLang.POLL_STARTED.Broadcast( Name, Description );

lock ( Polls ) Polls.Add( Name, this );

var thiz = this;

lock ( Polls ) Polls.Add( Name, thiz );

if ( Duration > 0 )
{
Tasks.New( task =>
Expand All @@ -280,7 +277,7 @@ public void Start()
thiz.Stop();
}
}).Delay( Duration * 1000 ).Go();
}).Delay( Duration * 1000 ).Go();
}

if ( !UEssentials.Config.EnablePollRunningMessage ) return;
Expand Down

0 comments on commit 1f71256

Please sign in to comment.