Greet/leave messages can now be turned on and off.
This commit is contained in:
		| @@ -1,11 +1,17 @@ | |||||||
| server="irc.netwirc.tk" |  | ||||||
| port=6667 |  | ||||||
| #enter channels here in quotes before the ) | #enter channels here in quotes before the ) | ||||||
| channel=( | channel=( | ||||||
|   "a11y" |   "a11y" | ||||||
| ) | ) | ||||||
| nick="storm_bot" | # Greet people who enter the channel? (true/false) | ||||||
| # format=username hostname servername :realname | # Configure greetings in triggers/greet/greet.sh | ||||||
| user="$nick ${server%.} $server :$nick" | greet=true | ||||||
|  | # Say something when people leave the channel? (true/false) | ||||||
|  | # Configure bye messages in triggers/bye/bye.sh | ||||||
|  | leave=true | ||||||
| # Path to log file | # Path to log file | ||||||
| log="log.txt" | log="log.txt" | ||||||
|  | nick="storm_bot" | ||||||
|  | port=6667 | ||||||
|  | server="irc.netwirc.tk" | ||||||
|  | # format=username hostname servername :realname | ||||||
|  | user="$nick ${server%.} $server :$nick" | ||||||
|   | |||||||
							
								
								
									
										6
									
								
								bot.sh
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								bot.sh
									
									
									
									
									
								
							| @@ -33,10 +33,10 @@ do | |||||||
|        continue  |        continue  | ||||||
|       fi |       fi | ||||||
|       echo "MODE #$channel +o $who" >> $input |       echo "MODE #$channel +o $who" >> $input | ||||||
|       ./triggers/greet/greet.sh $who $chan |       [ "${greet,,}" = "true" ] && ./triggers/greet/greet.sh $who $chan | ||||||
|     ;; |     ;; | ||||||
|     # run when someone leaves |     # run when someone leaves | ||||||
|     *PART #*) |     *"PART #"*) | ||||||
|       who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/") |       who=$(echo "$res" | perl -pe "s/:(.*)\!.*@.*/\1/") | ||||||
|       chan="$(echo "$res" | cut -d '#' -f2)" |       chan="$(echo "$res" | cut -d '#' -f2)" | ||||||
|       chan="#$chan" |       chan="#$chan" | ||||||
| @@ -44,7 +44,7 @@ do | |||||||
|        continue  |        continue  | ||||||
|       fi |       fi | ||||||
|       echo "MODE #$channel +o $who" >> $input |       echo "MODE #$channel +o $who" >> $input | ||||||
|       ./triggers/greet/bye.sh $who $chan |       [ "${leave,,}" = "TRUE" ] && ./triggers/bye/bye.sh $who $chan | ||||||
|     ;; |     ;; | ||||||
|     # run when a message is seen |     # run when a message is seen | ||||||
|     *PRIVMSG*) |     *PRIVMSG*) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user