Commit 971bee67 authored by 神楽坂玲奈's avatar 神楽坂玲奈

https

parent 71ab8cc1
......@@ -50,7 +50,7 @@ Icon=#{Dir.pwd}/graphics/system/icon.png
Type=Application
Categories=Game
Path=#{Dir.pwd}
URL=http://my-card.in/
URL=https://my-card.in/
MimeType=x-scheme-handler/mycard;application/x-ygopro-deck;application/x-ygopro-replay'
EOF
x_ygopro_deck = <<EOF
......
......@@ -3,7 +3,7 @@ require "fileutils"
require_relative 'card'
module Update
Version = '1.0.1'
URL = "http://my-card.in/mycard/update.json?version=#{Version}"
URL = "https://my-card.in/mycard/update.json?version=#{Version}"
class <<self
attr_reader :thumbnails, :images, :status
......@@ -117,7 +117,7 @@ module Update
$log.info('待下载的完整卡图') { @images.inspect }
$log.info('待下载的缩略卡图') { @thumbnails.inspect }
open('http://my-card.in/cards/image.json') do |f|
open('https://my-card.in/cards/image.json') do |f|
image_index = JSON.parse(f.read)
$log.info('卡图路径'){image_index}
url = image_index['url']
......
......@@ -164,7 +164,7 @@ class Window_Deck < Window_Scrollable
result << key[(c >> i * 6) & 0x3F]
end
end
Dialog.web "http://my-card.in/decks/new?name=#{File.basename(@items[index[0]], ".ydk")}&cards=#{result}#share"
Dialog.web "https://my-card.in/decks/new?name=#{File.basename(@items[index[0]], ".ydk")}&cards=#{result}#share"
when :delete
require_relative 'widget_msgbox'
......
......@@ -34,7 +34,7 @@ class Window_LobbyButtons < Window_List
case @index
when 0 #常见问题
require_relative 'dialog'
Dialog.web "http://my-card.in/login?user[name]=#{CGI.escape $game.user.name}&user[password]=#{CGI.escape $game.password}&continue=/topics/1453"
Dialog.web "https://my-card.in/login?user[name]=#{CGI.escape $game.user.name}&user[password]=#{CGI.escape $game.password}&continue=/topics/1453"
when 1 #房间筛选
if @filter_window and !@filter_window.destroyed?
@filter_window.destroy
......@@ -53,7 +53,7 @@ class Window_LobbyButtons < Window_List
require 'open-uri'
Thread.new {
begin
open('http://my-card.in/match') { |f|
open('https://my-card.in/match') { |f|
@waiting = false
if f.read =~ /^mycard:\/\/([\d\.]+):(\d+)\/(.*)$/
room = Room.new(nil, $3.to_s)
......
......@@ -84,7 +84,7 @@ class Ygocore < Game
def connect
@recv = Thread.new do
EventMachine::run {
http = EM::HttpRequest.new("http://my-card.in/servers.json").get
http = EM::HttpRequest.new("https://my-card.in/servers.json").get
http.callback {
begin
self.servers.replace JSON.parse(http.response).collect { |data| Server.new(data['id'], data['name'], data['ip'], data['port'], data['auth']) }
......@@ -94,7 +94,7 @@ class Ygocore < Game
end
#EventMachine::connect "mycard-server.my-card.in", 9997, Client
ws = WebSocket::EventMachine::Client.connect(:uri => 'ws://my-card.in/rooms.json');
ws = WebSocket::EventMachine::Client.connect(:uri => 'wss://my-card.in/rooms.json');
ws.onmessage do |msg, type|
$log.info('收到websocket消息') { msg.force_encoding("UTF-8") }
Game_Event.push Game_Event::RoomsUpdate.new JSON.parse(msg).collect { |room| Game_Event.parse_room(room) }
......@@ -360,7 +360,7 @@ class Ygocore < Game
$config['ygocore']['announcements'] ||= [Announcement.new("正在读取公告...", nil, nil)]
Thread.new do
begin
open('http://my-card.in/announcements.json') do |file|
open('https://my-card.in/announcements.json') do |file|
$config['ygocore']['announcements'].replace JSON.parse(file.read).collect { |announcement|
Announcement.new(announcement['title'], announcement['url'], Date.parse(announcement['created_at']))
}
......
register: http://my-card.in/register
register: https://my-card.in/register
api: http://master.smdcn.net:7922/
index: http://my-card.in/
index: https://my-card.in/
server: 122.0.65.70
port: 7911
\ No newline at end of file
......@@ -15,7 +15,7 @@ class User
end
def space
if @certified
Dialog.web "http://my-card.in/users/#{CGI.escape @id.to_s}"
Dialog.web "https://my-card.in/users/#{CGI.escape @id.to_s}"
else
Widget_Msgbox.new("查看资料", "用户#{@name}没有注册", :ok => "确定")
end
......@@ -29,9 +29,9 @@ class User
yield result
Thread.new do
require 'cgi'
$log.info('读取头像'){"http://my-card.in/users/#{CGI.escape id.to_s}.png"}
$log.info('读取头像'){"https://my-card.in/users/#{CGI.escape id.to_s}.png"}
begin
open("http://my-card.in/users/#{CGI.escape id.to_s}.png", 'rb') {|io|open(cache, 'wb') {|c|c.write io.read}}
open("https://my-card.in/users/#{CGI.escape id.to_s}.png", 'rb') {|io|open(cache, 'wb') {|c|c.write io.read}}
rescue Exception => exception
$log.error('下载头像'){[exception.inspect, *exception.backtrace].join("\n").force_encoding("UTF-8")}
cache = "graphics/avatars/error_#{size}.png"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment