Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $${
- // Bind to onSendChatMessage
- // Converts Celsius to Fahrenheit ie "1c (32f)"
- // Will probs convert more in the future but lazy af
- STRIP(&chat,%CHAT%)
- IFMATCHES(%&chat%,"([0-9]+)c\b")
- MATCH(%&chat%,"(-?[0-9]+)c",{#ctemp})
- #ftemp = ((#ctemp * 9) / 5) + 32
- REPLACE(&chat,"%#ctemp%c","%#ctemp%c (%#ftemp%f)")
- FILTER
- ECHO(%&chat%)
- ENDIF
- }$$
Advertisement
Add Comment
Please, Sign In to add comment