diff options
-rw-r--r-- | app/controllers/statics_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/users_controller.rb | 4 | ||||
-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 | ||||
-rw-r--r-- | app/views/users/edit.html.erb | 6 | ||||
-rw-r--r-- | app/views/users/show.html.erb | 2 | ||||
-rw-r--r-- | db/migrate/20170708011014_remove_skype_visibility_from_users.rb | 6 |
13 files changed, 25 insertions, 25 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 5efed4d..5c55976 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -137,9 +137,9 @@ class UsersController < ApplicationController def update if (mod? && current_user.role >= @user.role ) || (@user.is?(current_user) && confirmed?) if mod? - userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about, :role, :badge, :confirmed, :header_scroll, :utc_time, :dark]) + userdata = user_params([:name, :skype, :youtube, :twitter, :about, :role, :badge, :confirmed, :header_scroll, :utc_time, :dark]) else - userdata = user_params([:name, :skype, :skype_public, :youtube, :twitter, :about, :header_scroll, :utc_time, :dark]) + 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." 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 5111d0d..8f82cde 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 %>"> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 133a69d..abd1fa4 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -49,12 +49,6 @@ </td> </tr> <tr> - <td>Show Skype to</td> - <td> - <%= f.select :skype_public, [["Staff only", false], ["All users", true]], {}, { disabled: !can_edit? } %> - </td> - </tr> - <tr> <td>YouTube Channel ID</td> <td> <%= f.text_field :youtube, placeholder: "YouTube Channel ID", disabled: !can_edit? %> diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index e371a09..794d2e2 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -52,7 +52,7 @@ <td><b>Role</b></td> <td><%= link_to @user.role, users_path(:role => @user.role.name) %></td> </tr> - <% if current_user && !@user.skype.blank? && (@user.skype_public || current_user == @user || mod?) %> + <% if current_user && !@user.skype.blank? %> <tr> <td><b>Skype</b></td> <td><%= link_to @user.skype, "skype:#{@user.skype}?chat", target: "_blank" %></a></td> diff --git a/db/migrate/20170708011014_remove_skype_visibility_from_users.rb b/db/migrate/20170708011014_remove_skype_visibility_from_users.rb new file mode 100644 index 0000000..92a9482 --- /dev/null +++ b/db/migrate/20170708011014_remove_skype_visibility_from_users.rb @@ -0,0 +1,6 @@ +class RemoveSkypeVisibilityFromUsers < ActiveRecord::Migration + def change + remove_column :users, :skype_public + User.update_all skype: nil + end +end |