Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias get_country {
- ; EXAMPLE: //echo -a Country: $get_country(gr)
- if (!$1) { return N/A }
- var %f = countries.txt
- if (!$isfile(%f)) { return N/A }
- if ($remove($1,.) isnum) { return N/A }
- var %r = $read(%f,ns,$1)
- if (%r) { return $remove(%r,-) }
- elseif (!%r) { return Unknown }
- }
- alias get_country_code {
- ; EXAMPLE: //echo -a Country Code: $get_country_code(greece)
- if (!$1) { return N/A }
- var %f = countries.txt
- if (!$isfile(%f)) { return N/A }
- if ($remove($1,.) isnum) { return N/A }
- var %r = $read(%f,nw,* $+ $1 $+ *)
- if (%r) { return $gettok(%r,1,32) }
- elseif (!%r) { return Unknown }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement