Paul Klumpp 12 роки тому
батько
коміт
4ec85db460
2 змінених файлів з 3 додано та 3 видалено
  1. 1 1
      central.rb
  2. 2 2
      connection.rb

+ 1 - 1
central.rb

@@ -146,7 +146,7 @@ end
 
 def main
 	
-	raise "ARGV[0] must be valid ssh commands with the uri (user@host) in the beginning!" unless ARGV[0] =~ /^.+@.+\..+$/
+	raise "ARGV[0] must be valid ssh commands with the uri (user@host) in the beginning!" unless ARGV[0] =~ /^.+@.+$/
 	sshcmd = "%s" % [ARGV[0]] 
 	
 	$s = IO.popen("ssh #{sshcmd}", "r+")

+ 2 - 2
connection.rb

@@ -444,11 +444,11 @@ def main
 				elsif cmd == "WHO"
 					
 					put_log "SYS Asking who's here."
-					send_cmd("WHO", "is here?")
+					send_cmd(cmd, "is here?")
 
 				elsif cmd == "PART"
 					put_log "SYS Goodbye '#{$user}'."
-					send_cmd("PART", "The party was fun.")
+					send_cmd(cmd, "The party was fun.")
 					
 				else
 					# universal sender for other allowed commands.