Commit fc7b0c7a authored by 神楽坂玲奈's avatar 神楽坂玲奈

fix

parent f590f7b2
This diff was suppressed by a .gitattributes entry.
......@@ -58,7 +58,7 @@ class Window_LobbyButtons < Window_List
if f.read =~ /^mycard:\/\/([\d\.]+):(\d+)\/(.*)$/
room = Room.new(nil, $3.to_s)
room.server = Server.new(nil, nil, $1, $2.to_i, false)
$game.run_ygocore(room, true)
Ygocore.run_ygocore(room, true)
else
$log.error('自动匹配非法回复'){f.read}
Widget_Msgbox.new("自动匹配", "错误: #{exception}", ok: "确定")
......
......@@ -363,7 +363,7 @@ class Ygocore < Game
def self.get_announcements
#公告
$config['ygocore'] ||= {}
$config['ygocore']['announcements'] ||= [Announcement.new("开放注册", nil, nil)]
$config['ygocore']['announcements'] ||= [Announcement.new("正在读取公告...", nil, nil)]
Thread.new do
begin
open('http://my-card.in/announcements.json') do |file|
......@@ -373,7 +373,7 @@ class Ygocore < Game
Config.save
end
rescue Exception => exception
$log.error('公告读取失败') { [exception.inspect, *exception.backtrace].collect { |str| str.encode("UTF-8") }.join("\n") }
$log.error('公告读取失败') { [exception.inspect, *exception.backtrace].collect { |str| str.force_encoding("UTF-8") }.join("\n") }
end
end
end
......
#!/bin/sh
echo 'you only need to run from this script once, it will create desktop shortcut automatically after first run.'
echo -n "Username: "
read username
echo -n "Password: "
read password
cd "$(dirname "$0")"
echo "ygocore:
username: '$username'
password: '$password'
" > config.yml
ruby -KU lib/main.rb
\ No newline at end of file
This diff is collapsed.
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