View Full Version : Lich Connectivity Troubles
snarlingmaiden
11-19-2010, 06:55 PM
Fixed, was interwebz NOT Lich.
:thanx:
phantasm
11-19-2010, 09:30 PM
server_thread = Thread.new {
begin
=begin
50.times {
server_thread.kill unless $_SERVERSTRING_ = $_SERVER_.gets
$stderr.puts $_SERVERSTRING_
$cmd_prefix = String.new if $_SERVERSTRING_ =~ /^\034GSw/
begin
# The Rift, Scatter is broken...
$_SERVERSTRING_.sub!(/(.*)\s\s<compDef id='room text'><\/compDef>/) { "<compDef id='room desc'>#{$1}</compDef>" }
# Cry For Help spell is broken...
if $_SERVERSTRING_ =~ /<pushStream id="familiar" \/><prompt time="[0-9]+">><\/prompt>/
$_SERVERSTRING_.sub!('<pushStream id="familiar" />', '')
end
$_SERVERBUFFER_.push($_SERVERSTRING_)
if alt_string = DownstreamHook.run($_SERVERSTRING_)
if $frontend =~ /^(?:wizard|avalon)$/
alt_string = sf_to_wiz(alt_string)
end
$_CLIENT_.write(alt_string)
end
unless $_SERVERSTRING_ =~ /^<setting/
begin
REXML::Document.parse_stream($_SERVERSTRING_, XMLData)
rescue
if $_SERVERSTRING_ =~ /<[^>]+='[^=>'\\]+'[^=>']+'[\s>]/
# Simu has a nasty habbit of bad quotes in XML. <tag attr='this's that'>
$_SERVERSTRING_.gsub!(/(<[^>]+=)'([^=>'\\]+'[^=>']+)'([\s>])/) { "#{$1}\"#{$2}\"#{$3}" }
retry
end
$stdout.puts "--- error: server_thread: #{$!}"
$stderr.puts "error: server_thread: #{$!}"
$stderr.puts $!.backtrace
XMLData.reset
end
Script.new_downstream_xml($_SERVERSTRING_)
stripped_server = strip_xml($_SERVERSTRING_)
stripped_server.split("\r\n").each { |line|
unless line =~ /^\s\*\s[A-Z][a-z]+ (?:returns home from a hard day of adventuring\.|joins the adventure\.|(?:is off to a rough start! (?:H|She) )?just bit the dust!|was just incinerated!|was just vaporized!|has been vaporized!|has disconnected\.)$|^ \* The death cry of [A-Z][a-z]+ echoes in your mind!$|^\r*\n*$/
Script.new_downstream(line) unless line.empty?
end
}
end
rescue
$stdout.puts "--- error: server_thread: #{$!}"
$stderr.puts "error: server_thread: #{$!}"
$stderr.puts $!.backtrace
end
}
Tillmen
11-19-2010, 10:40 PM
--- error: server_thread: Invalid argument
That error happens whenever the connection is closed, but Windows doesn't tell Ruby about it. Leading up to that message, while nothing is coming in, it's not frozen or anything. There is just no connection to the game. The window is still open because Ruby doesn't know there isn't a connection to the game. As soon as you try to send something, it figures it out and exits.
The easiest way to fix this is to switch to Linux. You will never have this error on Linux. Which is not to say you won't be disconnected... you'll just get an error immediately saying the the connection was closed rather than waiting a while and getting a nonsense error message like invalid argument.
The root of the problem is just a mysterious interruption in your interwebz. It's made a little more annoying by Windows being a jerk. An easy way to recreate this problem is to be connected to a wireless router, and just start walking with your notebook until you're out of range. Because the error can be caused so quickly and reliably, I assume it won't happen without first having some temporary problem with your internet connection.
On the other hand.. I find it very easy to stay connected for weeks straight. I'm using Ruby 1.9 on Xubuntu. There's a small chance that upgrading Ruby on Windows would help with the problem, but it will cause you more trouble than it's worth. Making a new Ruby installer is on my to do list though... heh.
snarlingmaiden
11-19-2010, 11:51 PM
The root of the problem is just a mysterious interruption in your interwebz.
They are going to test the line this weekend apparently the connection log says it's
dropped in and out about 268+ times for which they cannot find a reason. Odd. . .
Thanks.
But the system runs SO nicely otherwise with the reformatting and fresh install of Winows XP,
Office 2007, lich, ruby, etc. . . .it IS the mysterious interruption of our interwebz heh.
snarlingmaiden
11-20-2010, 05:39 PM
server_thread = Thread.new {
begin
=begin
50.times {
server_thread.kill unless $_SERVERSTRING_ = $_SERVER_.gets
$stderr.puts $_SERVERSTRING_
$cmd_prefix = String.new if $_SERVERSTRING_ =~ /^\034GSw/
begin
# The Rift, Scatter is broken...
$_SERVERSTRING_.sub!(/(.*)\s\s<compDef id='room text'><\/compDef>/) { "<compDef id='room desc'>#{$1}</compDef>" }
# Cry For Help spell is broken...
if $_SERVERSTRING_ =~ /<pushStream id="familiar" \/><prompt time="[0-9]+">><\/prompt>/
$_SERVERSTRING_.sub!('<pushStream id="familiar" />', '')
end
$_SERVERBUFFER_.push($_SERVERSTRING_)
if alt_string = DownstreamHook.run($_SERVERSTRING_)
if $frontend =~ /^(?:wizard|avalon)$/
alt_string = sf_to_wiz(alt_string)
end
$_CLIENT_.write(alt_string)
end
unless $_SERVERSTRING_ =~ /^<setting/
begin
REXML::Document.parse_stream($_SERVERSTRING_, XMLData)
rescue
if $_SERVERSTRING_ =~ /<[^>]+='[^=>'\\]+'[^=>']+'[\s>]/
# Simu has a nasty habbit of bad quotes in XML. <tag attr='this's that'>
$_SERVERSTRING_.gsub!(/(<[^>]+=)'([^=>'\\]+'[^=>']+)'([\s>])/) { "#{$1}\"#{$2}\"#{$3}" }
retry
end
$stdout.puts "--- error: server_thread: #{$!}"
$stderr.puts "error: server_thread: #{$!}"
$stderr.puts $!.backtrace
XMLData.reset
end
Script.new_downstream_xml($_SERVERSTRING_)
stripped_server = strip_xml($_SERVERSTRING_)
stripped_server.split("\r\n").each { |line|
unless line =~ /^\s\*\s[A-Z][a-z]+ (?:returns home from a hard day of adventuring\.|joins the adventure\.|(?:is off to a rough start! (?:H|She) )?just bit the dust!|was just incinerated!|was just vaporized!|has been vaporized!|has disconnected\.)$|^ \* The death cry of [A-Z][a-z]+ echoes in your mind!$|^\r*\n*$/
Script.new_downstream(line) unless line.empty?
end
}
end
rescue
$stdout.puts "--- error: server_thread: #{$!}"
$stderr.puts "error: server_thread: #{$!}"
$stderr.puts $!.backtrace
end
}
I don't know what this means . . .
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.