home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 32 Periodic / 32-Periodic.zip / vnl0998i.zip / EZVoice.cmd next >
OS/2 REXX Batch file  |  1998-09-12  |  4KB  |  104 lines

  1. /* EZVoice.cmd - Swanee                                         */
  2. /*                                                              */
  3. /* Install EZIRC with it's normal installation script, then     */
  4. /* run this cmd file from the EZIRC directory that contains     */
  5. /* the "EZIRC.INI" file. It will setup the Webbnet servers and  */
  6. /* the channels for as easy as possible connection to #Voice    */
  7. /*                                                              */
  8. /* After running this script, EZIRC should connect to a Webbnet */
  9. /* server and automatically join the #Voice channel.            */
  10. /*                                                              */
  11. /* The connection should be complete. Watch for a while and     */
  12. /* join in the conversation when you are comfortable.           */
  13. /*                                                              */
  14. /* There are several nets available for irc. The #Voice channel */
  15. /* on Webbnet is only active during meetings. If you want to    */
  16. /* try the #OS/2 channel on another net, you'll have to go to   */
  17. /* "Server Options" - "Connect to Server" and scroll down the   */
  18. /* IRC Server listing to any server listed below                */
  19. /* "irc.se.webbnet.org:6667" These servers are the ones listed  */
  20. /* originally by EZIRC and will get you onto UnderNet or Efnet  */
  21. /* Here you will find active #OS/2 channels.                    */
  22. /*                                                              */
  23. /* Save your original EZIRC.INI and EZIRC.SCR files...          */
  24. /* Just in case...                                              */
  25.  
  26. Call Init
  27. Call DoIni
  28. Call DoScr
  29. Call DoJoin
  30. say crlf crlf||'EZIRC should be ready to start and automatically'
  31. say 'log onto the webbnet servers and channel #voice' crlf
  32. say 'The channel is always open but meetings are on the'
  33. say 'first and third mondays of the month. 8:00 EST' crlf
  34.  
  35. Done:
  36. Exit
  37.  
  38. Init:
  39.  
  40. crlf='0D0A'x
  41. filename=directory()||'\ezirc.ini'
  42. ServerInfo1='server=irc.webbnet.org:6667 irc.us.webbnet.org:6667 irc.in2.webbnet.or:6667 irc.md2.webbnet.or:6667 irc.mi.webbnet.org:6667 irc.nc.webbnet.org:6667'
  43. ServerInfo2=' irc.pa2.webbnet.or:6667 irc.tn.webbnet.org:6667 irc.tx2.webbnet.or:6667 irc.wa2.webbnet.or:6667 irc.ca.webbnet.org:6667 irc.de.webbnet.org:6667 irc.se.webbnet.org:6667 '
  44. ServerInfo=ServerInfo1||ServerInfo2
  45. ChannelInfo='preferred_channels=#voice #os/2 #os2prog'
  46. ConnectInfo='auto_connect=yes'
  47. JoinCmd="/* Script to auto join #voice */"||crlf||"parse arg window remain"||crlf||crlf||"str = '/join #voice'"||crlf||"return str"
  48.  
  49. return
  50.  
  51. DoIni:
  52.  
  53.   filename = STREAM(filename, 'C', 'QUERY EXISTS')
  54.   IF filename>'' then do
  55.     say crlf crlf crlf||"This script will modify the EZIRC.INI file making it easier" crlf||"to locate the #voice channel on it's Webbnet servers"
  56.     index=0
  57.     rc = STREAM(filename, 'C', 'OPEN READ')
  58.     DO WHILE LINES(filename)
  59.       index=index+1
  60.       value.index = LINEIN(filename)
  61.       if left(value.index, 7)='server=' then do
  62.         EZServers=right(value.index,length(value.index)-7)
  63.         value.index=ServerInfo||EZServers
  64.       end
  65.       if left(value.index, 19)='preferred_channels=' then value.index=ChannelInfo
  66.       if left(value.index, 13)='auto_connect=' then value.index=ConnectInfo
  67.       value.0=index
  68.     END
  69.     Call stream filename,'C','CLOSE'
  70.     '@ERASE' filename
  71.     DO x=1 to index
  72.       CALL LINEOUT filename, value.x
  73.     END
  74.     CALL STREAM filename,'C','CLOSE'
  75.     say crlf crlf||'The EZIRC.INI file has been changed.'
  76.   END
  77.   ELSE do
  78.     say 'This script must be run from the directory containing the "EZIRC.INI" file'
  79.     Call Done
  80.   END
  81.  
  82. return
  83.  
  84. DoScr:
  85.  
  86.   filename=directory()||'\script\ezirc.scr'
  87.   Call lineout filename, 'join.cmd MOTD'
  88.   Call stream filename,'C','CLOSE'
  89.   say 'The EZIRC.SCR file has been changed.'
  90.  
  91. return
  92.  
  93. DoJoin:
  94.  
  95.   filename=directory()||'\script\join.cmd'
  96.   value=STREAM(filename, 'C', 'QUERY EXISTS')
  97.   IF value>'' then '@ERASE' filename
  98.   Call charout filename, JoinCmd, 1
  99.   Call stream filename,'C','CLOSE'
  100.   say 'The JOIN.CMD file has been written.'
  101.  
  102. return
  103.  
  104.