Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on *:TEXT:!convert*:#Landail: {
- if ($1 = !convert) {
- if (!%no.flood. [ $+ [ $nick ] ] ) {
- if (!$2) {
- msg # error $+ : Insufficient Parameters. SYNTAX: !convert c/f <temperature> | halt
- }
- if ($2 isnum) {
- msg # error $+ : Insufficient Parameters. SYNTAX: !convert c/f <temperature> | halt
- }
- if ($2 = f || $2 = F) {
- if ($3 = 0) { msg # Converting 0 $+ $chr(176) Fahrenheit to Celsius: -17.77 $+ $chr(176) Celsius | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
- if (!$3) { msg # $nick I need a temperature to convert. }
- if ($3 isletter) { msg $chan Converting $3 $+ : You\'re an Idiot? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
- if ($3 isnum) {
- set %t1 $calc($3 - 32)
- set %temp $calc(%t1 * 0.55555555555555555555555555555556)
- msg # Converting $3 $+ $chr(176) Fahrenheit to Celsius: $round(%temp,2) $+ $chr(176) Celsius
- set -u3 %no.flood. [ $+ [ $nick ] ] 1
- }
- }
- if ($2 = c || $2 = C) {
- if ($3 = 0) { msg # Converting 0 $+ $chr(176) Celsius to Fahrenheit: 32 $+ $chr(176) Fahrenheit | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
- if (!$3) { msg # $nick $+ , I need a temperature to convert. }
- if ($3 isletter) { msg # Converting $3 $+ : ? | set -u5 %no.flood. [ $+ [ $nick ] ] 1 | halt }
- if ($3 isnum) {
- set %t1 $calc($3 * 1.8)
- set %temp $calc(%t1 + 32)
- msg # Converting $3 $+ $chr(176) Celsius to Fahrenheit: $round(%temp,2) $+ $chr(176) Fahrenheit
- set -u3 %no.flood. [ $+ [ $nick ] ] 1
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement