|  | @@ -12,6 +12,9 @@ usage() {
 | 
	
		
			
			| 12 | 12 |          echo "usage: $self [options] [-l max_lines] [-L max_width] -f message_file|-"
 | 
	
		
			
			| 13 | 13 |          echo "options: [-h host] [-p port] [-n nick] [-c context] [-u user]"
 | 
	
		
			
			| 14 | 14 |          echo ""
 | 
	
		
			
			|  | 15 | +        echo "user can be user name but also channel name, in that case notifirc"
 | 
	
		
			
			|  | 16 | +        echo "will JOIN the channel first."
 | 
	
		
			
			|  | 17 | +        echo ""
 | 
	
		
			
			| 15 | 18 |          echo "Defaults for options can be defined as POSIX shell assignments under"
 | 
	
		
			
			| 16 | 19 |          echo "/etc/notifirc.rc or ~/.notifirc.rc. (E.g. 'nick=jdoe', 'max_width=40')."
 | 
	
		
			
			| 17 | 20 |          echo ""
 | 
	
	
		
			
			|  | @@ -30,6 +33,9 @@ mkcommands() {
 | 
	
		
			
			| 30 | 33 |      local message
 | 
	
		
			
			| 31 | 34 |      echo "NICK $nick"
 | 
	
		
			
			| 32 | 35 |      echo "USER $nick 8 * :notifirc bot"
 | 
	
		
			
			|  | 36 | +    if test "${user:0:1}" == '#'; then
 | 
	
		
			
			|  | 37 | +        echo "JOIN $user"
 | 
	
		
			
			|  | 38 | +    fi
 | 
	
		
			
			| 33 | 39 |      while read -r message;
 | 
	
		
			
			| 34 | 40 |      do
 | 
	
		
			
			| 35 | 41 |          echo "PRIVMSG $user :$message"
 |