home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / ENAME101.ZIP / ENAME.PPS < prev    next >
Text File  |  1995-01-11  |  2KB  |  74 lines

  1. ' Program      : EName
  2. ' Version      : 1.01, FREEWARE
  3. ' Programmer   : Chris Duke (c)1995 Duke Engineering
  4. ' Fidonet addr.: Chris Duke@1:202/238
  5. ' Internet     : chris.duke@olr.com
  6. ' BBS          : Online Resource
  7. ' Phone number : 619-793-8360/1
  8. ' Date         : 01/09/1995
  9. ' Description  : Converts user's name to a legitimate email address
  10. '
  11. INTEGER i
  12. STRING s
  13. STRING new
  14. STRING a
  15. STRING t
  16. STRING domain
  17. STRING clrName
  18. STRING clrDomain
  19. STRING strBefore
  20. STRING strAfter
  21. STRING strSep
  22. STRING lcYesNo
  23.  
  24. FOPEN 1,PPEPATH()+"ENAME.INI",O_RD,S_DN
  25.    FGET 1,clrName
  26.    FGET 1,clrDomain
  27.    FGET 1,strBefore
  28.    FGET 1,strAfter
  29.    FGET 1,lcYesNo
  30. FCLOSE 1
  31.  
  32. s = U_NAME()
  33. if (Upper(lcYesNo) = "YES") s = Lower(s)
  34. new = ""
  35. domain = ReadLine(PCBDat(),289)
  36. strSep = ReadLine(PCBDat(),294)
  37.  
  38. for i = 1 to Len(s)
  39.    a = Mid(s,i,1)
  40.  
  41.    'Build address based on RFC1137 as a template for converting a PCBoard
  42.    'user name into Internet/UUCP address.
  43.    '
  44.    if (a = " ") then
  45.       t = strSep
  46.    elseif (a = ".") then
  47.       t = "#d#"
  48.    elseif (a = "_") then
  49.       t = "#u#"
  50.    elseif (a = "(") then
  51.       t = "#l#"
  52.    elseif (a = ")") then
  53.       t = "#r#"
  54.    elseif (a = ",") then
  55.       t = "#m#"
  56.    elseif (a = ":") then
  57.       t = "#c#"
  58.    elseif (a = "\") then
  59.       t = "#b#"
  60.    elseif (a = "#") then
  61.       t = "#h#"
  62.    elseif (a = "=") then
  63.       t = "#e#"
  64.    elseif (a = "/") then
  65.       t = "#s#"
  66.    else
  67.       t = a
  68.    endif
  69.  
  70.    new = new + t
  71. next
  72.  
  73. PRINT strBefore + " " + clrName + new + clrDomain + "@" + domain + strAfter + "@X07"
  74.