Advertisement
westor

Country & Country code read identifiers

Nov 20th, 2014
341
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.64 KB | None | 0 0
  1. alias get_country {
  2.  
  3.   ; EXAMPLE: //echo -a Country: $get_country(gr)
  4.  
  5.   if (!$1) { return N/A }
  6.   var %f = countries.txt
  7.   if (!$isfile(%f)) { return N/A }
  8.   if ($remove($1,.) isnum) { return N/A }
  9.   var %r = $read(%f,ns,$1)
  10.   if (%r) { return $remove(%r,-) }
  11.   elseif (!%r) { return Unknown }
  12. }
  13.  
  14. alias get_country_code {
  15.  
  16.   ; EXAMPLE: //echo -a Country Code: $get_country_code(greece)
  17.  
  18.   if (!$1) { return N/A }
  19.   var %f = countries.txt
  20.   if (!$isfile(%f)) { return N/A }
  21.   if ($remove($1,.) isnum) { return N/A }
  22.   var %r = $read(%f,nw,* $+ $1 $+ *)
  23.   if (%r) { return $gettok(%r,1,32) }
  24.   elseif (!%r) { return Unknown }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement