diff options
-rw-r--r-- | app/controllers/statics_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/users_controller.rb | 5 | ||||
-rw-r--r-- | app/models/threadreply.rb | 2 | ||||
-rw-r--r-- | app/views/redstoner_mailer/email_change_confirm_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_post_comment_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_post_mention_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_thread_mention_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/redstoner_mailer/new_thread_reply_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/redstoner_mailer/register_mail.html.erb | 4 | ||||
-rw-r--r-- | app/views/statics/donate.html.erb | 4 |
10 files changed, 21 insertions, 16 deletions
diff --git a/app/controllers/statics_controller.rb b/app/controllers/statics_controller.rb index 4b0c911..08dceef 100644 --- a/app/controllers/statics_controller.rb +++ b/app/controllers/statics_controller.rb @@ -17,7 +17,7 @@ class StaticsController < ApplicationController end def online - json = JSON.parse(File.read("/etc/minecraft/redstoner/plugins/JavaUtils/players.json")) + json = JSON.parse(File.read("/etc/minecraft/redstoner/plugins/ModuleLoader/players.json")) @players = json["players"].collect!{ |p| User.find_by(uuid: p["UUID"].tr("-", "")) or User.new(name: p["name"], ign: p["name"], uuid: p["UUID"].tr("-", ""), role: Role.get("normal"), badge: Badge.get("none"), confirmed: true) }.sort_by!(&:role).reverse! @count = json["amount"] end diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index c660655..5f2c892 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -141,6 +141,11 @@ class UsersController < ApplicationController else userdata = user_params([:name, :skype, :youtube, :twitter, :about, :header_scroll, :utc_time, :dark]) end + if User.find_by(name: userdata[:name]) + flash[:alert] = "You have entered a name that belongs to someone else. Please try another." + redirect_to edit_user_path(@user) + return + end if userdata[:role] role = Role.get(userdata[:role]) if role && role <= current_user.role diff --git a/app/models/threadreply.rb b/app/models/threadreply.rb index f285073..aca7770 100644 --- a/app/models/threadreply.rb +++ b/app/models/threadreply.rb @@ -43,7 +43,7 @@ class Threadreply < ActiveRecord::Base unless old_content.present? posts.each do |post| # don't send mail to the author of this reply, don't send to banned/disabled users - if post.author != author && post.author.normal? && post.author.confirmed? # && + if post.author != author && post.author.normal? && post.author.confirmed? && thread.can_read?(post.author) users << post.author if post.author.mail_other_thread_reply? end end diff --git a/app/views/redstoner_mailer/email_change_confirm_mail.html.erb b/app/views/redstoner_mailer/email_change_confirm_mail.html.erb index 33e853a..37a5fbe 100644 --- a/app/views/redstoner_mailer/email_change_confirm_mail.html.erb +++ b/app/views/redstoner_mailer/email_change_confirm_mail.html.erb @@ -13,7 +13,7 @@ </div> <p></p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game.</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game.</p> <p>Your Redstoner team</p> </div> @@ -30,4 +30,4 @@ </p> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/redstoner_mailer/new_post_comment_mail.html.erb b/app/views/redstoner_mailer/new_post_comment_mail.html.erb index 8936087..6726535 100644 --- a/app/views/redstoner_mailer/new_post_comment_mail.html.erb +++ b/app/views/redstoner_mailer/new_post_comment_mail.html.erb @@ -14,7 +14,7 @@ %> <p><%= link_to "Click here", blogpost_url(@comment.blogpost, page: page) + "#comment-#{@comment.id}", style: "text-decoration: none; color: #4096EE;" %> to view the blog post.</p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> <p>Your Redstoner team</p> </div> @@ -29,4 +29,4 @@ </p> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/redstoner_mailer/new_post_mention_mail.html.erb b/app/views/redstoner_mailer/new_post_mention_mail.html.erb index 5119e7c..aef3eef 100644 --- a/app/views/redstoner_mailer/new_post_mention_mail.html.erb +++ b/app/views/redstoner_mailer/new_post_mention_mail.html.erb @@ -10,7 +10,7 @@ <p><%= link_to "Click here", blogpost_url(@post), style: "text-decoration: none; color: #4096EE;" %> to view the blog post.</p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> <p>Your Redstoner team</p> </div> @@ -26,4 +26,4 @@ </p> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/redstoner_mailer/new_thread_mention_mail.html.erb b/app/views/redstoner_mailer/new_thread_mention_mail.html.erb index 701901e..2aeaf0b 100644 --- a/app/views/redstoner_mailer/new_thread_mention_mail.html.erb +++ b/app/views/redstoner_mailer/new_thread_mention_mail.html.erb @@ -11,7 +11,7 @@ <p><%= link_to "Click here", forumthread_url(@thread), style: "text-decoration: none; color: #4096EE;" %> to view the thread.</p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> <p>Your Redstoner team</p> </div> @@ -28,4 +28,4 @@ </p> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/redstoner_mailer/new_thread_reply_mail.html.erb b/app/views/redstoner_mailer/new_thread_reply_mail.html.erb index eadd4f9..4081f05 100644 --- a/app/views/redstoner_mailer/new_thread_reply_mail.html.erb +++ b/app/views/redstoner_mailer/new_thread_reply_mail.html.erb @@ -15,7 +15,7 @@ %> <p><%= link_to "Click here", forumthread_url(@reply.thread, page: page) + "#reply-#{@reply.id}", style: "text-decoration: none; color: #4096EE;" %> to view the thread.</p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game or on the forums!</p> <p>Your Redstoner team</p> </div> @@ -30,4 +30,4 @@ <%= link_to "Email", "mailto:redstonerserver+website@gmail.com", style: "text-decoration: none; color: #4096EE;" %> </p> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/redstoner_mailer/register_mail.html.erb b/app/views/redstoner_mailer/register_mail.html.erb index 3e09a1e..35ccad9 100644 --- a/app/views/redstoner_mailer/register_mail.html.erb +++ b/app/views/redstoner_mailer/register_mail.html.erb @@ -25,7 +25,7 @@ </div> <p></p> - <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(role: "staff"), style: "text-decoration: none; color: #4096EE;" %> in-game.</p> + <p>If you have any questions or problems, just ask one of our <%= link_to "Staff", users_url(staff: ""), style: "text-decoration: none; color: #4096EE;" %> in-game.</p> <p>Your Redstoner team</p> </div> @@ -42,4 +42,4 @@ </p> </div> </div> -</div>
\ No newline at end of file +</div> diff --git a/app/views/statics/donate.html.erb b/app/views/statics/donate.html.erb index 2ca7114..be6ec1c 100644 --- a/app/views/statics/donate.html.erb +++ b/app/views/statics/donate.html.erb @@ -25,11 +25,11 @@ <div class="donations"> <div class="donation"> <div class="left"> - <img src="<%= image_url("anonymous_skin.png") %>" alt="sponsor's skin" class="body"> + <img src="https://crafatar.com/renders/body/97a4928198f045998e0e7a97eabae6ae?overlay=true&scale=3" alt="sponsor's skin" class="body"> </div> <div> <h1>Donate to our server sponsor</h1> - <h4>They pay for our server, but prefer to stay anonymous</h4> + <h4>PotatoKek pays for the server hardware. You can help him by donating here.</h4> <form target="_blank" method="post" action="https://www.paypal.com/cgi-bin/webscr"> <% if current_user %> <input name="custom" type="hidden" placeholder="Your Minecraft name" value="<%= current_user.ign %>"> |