Bladeren bron

smallest cleanup ever

Paul Klumpp 12 jaren geleden
bovenliggende
commit
4ec85db460
2 gewijzigde bestanden met toevoegingen van 3 en 3 verwijderingen
  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.