Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local votes = {}
- local mods = {}
- for i = 1, limit do
- table.insert ( votes, 0 )
- table.insert ( mods, 0 )
- end
- for i = 1, mod_count do
- local vote = tonumber ( db.get ( phase..i ) )
- if ( vote ) then
- for j = 1, limit do
- if ( vote > votes[j] ) then
- table.insert ( votes, j )
- table.insert ( mods, j )
- table.remove ( votes )
- table.remove ( mods )
- break
- end
- end
- end
- end
- for i = 1, limit do
- Irc:Send ( to, clr(3).."#"..i..":"..clr(7).." "..tostring ( db.get ( 'name_'..mods[i] ) ).." ("..votes[i].." votes)" )
- end
Add Comment
Please, Sign In to add comment