diff options
| author | makefu <github@syntax-fehler.de> | 2014-04-27 18:18:08 +0200 | 
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2014-04-27 18:18:08 +0200 | 
| commit | 95fbba75246cf1b5115bc5493d3119f9ea91221e (patch) | |
| tree | cca50d644839abdf40947d47b9f75220e5d78f63 /ship/lib/network | |
| parent | aa4b1772353ddf520b210bb1a692ce1b604cba23 (diff) | |
update things
Diffstat (limited to 'ship/lib/network')
| -rw-r--r-- | ship/lib/network | 11 | 
1 files changed, 11 insertions, 0 deletions
| diff --git a/ship/lib/network b/ship/lib/network index bc4d1047..6c8970a0 100644 --- a/ship/lib/network +++ b/ship/lib/network @@ -76,6 +76,17 @@ run_telnet(){    port="$2"    $(which_telnet) "$host" "$port"  } +port_open(){ +  # $1 - host +  # $2 - port +  #  nc -zw 2 $1 $2 +  echo | run_telnet "$1" "$2" & pid=$! +  { sleep 5; kill $pid;} & wid=$! +  wait $pid  +  RET=$? +  kill $wid >/dev/null 2>&1 +  return $RET +}  send_irc(){    ## reads from stdin, writes to IRC | 
