Added calculate module. Requires calc.
This commit is contained in:
		
							
								
								
									
										11
									
								
								modules/calculate/calculate.sh
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										11
									
								
								modules/calculate/calculate.sh
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| [ -f functions.sh ] && source functions.sh | ||||
|  | ||||
| calculate() { | ||||
|     calc -- "$*" | tr -d '[:space:]' | ||||
| } | ||||
|  | ||||
| name="$1" | ||||
| shift | ||||
| chan="$1" | ||||
| shift | ||||
| msg "$chan" "$name: $(calculate "$*")" | ||||
		Reference in New Issue
	
	Block a user