home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / icbrg200.zip / IBERGMSG.CMD < prev    next >
OS/2 REXX Batch file  |  1996-02-25  |  21KB  |  548 lines

  1. /*********************************************************************/
  2. /* IceBerg IRC REXX Command Script for GTirc.  V 2.00  25 Feb 96     */
  3. /*                  Copyright 1996 - Stephen Berg                    */
  4. /*********************************************************************/
  5. /* This file sets up all the commands that I have created, or stolen */
  6. /* from other scripts and changed to work with REXX.  It works in    */
  7. /* conjunction with the IBERGCMD.CMD script to customize your IRC    */
  8. /* client, add functionality and bring GTirc to a point where it more*/
  9. /* than competes with any other IRC client out there for OS/2.       */
  10. /*********************************************************************/
  11. /* This pair of REXX scripts and the ICESTART.TXT startup file are   */
  12. /* my creation and I retain all copyrights to the files.  They are   */
  13. /* however freely distributable, but I do ask that you email if you  */
  14. /* are using them.  sberg@southwind.com                              */
  15. /*********************************************************************/
  16.  
  17. Parse Upper Arg Win Us Prefix Cmd Chan Nick Rest
  18. Parse Arg xWin xUs xPrefix xCmd xChan xNick xRest 
  19. Parse Arg yWin yUs yPrefix yCmd yChan yNick yRest yWall yWall1 
  20.  
  21. Pool = 'OS2ENVIRONMENT'
  22. ErStr1 = '+++ Syntax +++++'
  23. ErStr2 = '++++ Error +++++'
  24. ErStr3 = '++++++++++++++++'
  25. titlline = '+------------------------IceBerg V 2.00------------------------+'
  26. /*********************************************************************/
  27. /* We see if this is a kick message for us. If so we format and      */
  28. /* display a message in the window and rejoin the channel.           */
  29. /*                                                                   */
  30. /* We send the join command directly to the server because if we     */
  31. /* send it as a normal command using IrcRexxCommand() it will be     */
  32. /* ignored because the kick has not been processed and it thinks     */
  33. /* we are still on the channel.                                      */
  34. /*                                                                   */
  35. /* We return a null string to suppress the kick message so that the  */
  36. /* window for the channel will not be closed.                        */
  37. /*                                                                   */
  38. /*********************************************************************/
  39.  
  40. if (Cmd = 'KICK' & Nick = Us) then do
  41.    By = substr(Prefix,2)
  42.    Posex = pos('!',By)
  43.    By = substr(By,1,posex - 1)
  44.  
  45.    Posex = pos(':',xRest)
  46.    Reason = substr(xRest,2)
  47.  
  48.    Disp = "*** Kicked by" By "(" || Reason || ")"
  49.    IrcRexxDisplay(Disp,Win)
  50.  
  51.    OutStr = "JOIN" Chan
  52.    IrcRexxSend(OutStr)
  53.    Return ""
  54. End
  55.  
  56. /*********************************************************************/
  57. /* AutoGreets are lame and obnoxious. So I removed them from         */
  58. /* the script that came with GTirc =:-)                              */
  59. /*********************************************************************/
  60. /* Begin a log file when we join a channel. This feature is disabled */
  61. /* by default. To enable it set the following variable:              */
  62. /*                                            /iceberg autolog on    */
  63. /*********************************************************************/
  64.  
  65. if (Cmd = 'JOIN' & VALUE('autolog',,Pool) = 'ON') then do
  66.    OutStr = "/LOG ON"
  67.    IrcRexxCommand(OutStr,Win)
  68. End
  69.  
  70. /*********************************************************************/
  71. /* MSG Logger, taken from Wease on IRC                               */
  72. /*********************************************************************/
  73. msglog = value('msglog',,Pool)
  74.  
  75. if(cmd='PRIVMSG' & CHAN = Us & msglog = 'ON') then do
  76.     Flag = Pos('', xNick)
  77.     if (Flag = 0) then do
  78.         xPrefix = Strip(xPrefix, L, ':')
  79.         xNick = Strip(xNick, L, ':')
  80.         message = xNick xRest
  81.         Posex = Pos('!', xPrefix)
  82.         fromnick = Substr(xPrefix, 1, Posex - 1)
  83.         fromid = Substr(xPrefix, Posex + 1)
  84.         logtext = fromnick fromid message
  85.         LineOut(messages.log, logtext)
  86.         LineOut(messages.log)
  87.         IrcRexxSend('NOTICE' fromnick ':Your msg has been logged by IceBerg 2.00',Win)
  88.     end
  89.     else do
  90.     end
  91. end
  92.  
  93. /*********************************************************************/
  94. /* Add-on to CTCP requests cause I wanted IceBerg to announce itself.*/
  95. /* Also: responses to things such as CTCP VERSION requests should    */
  96. /* never respond with MSG's, GTirc was on some CTCP functions.       */
  97. /* These bring GTirc more in line with RFC1459.                      */
  98. /*********************************************************************/
  99.  
  100. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':VERSION') then do
  101.     verresp = ':VERSION GTirc running IceBerg V 2.00, author SSgt, sberg@southwind.com'
  102.     fromid = Strip(xPrefix, L, ':')
  103.     Posex = Pos('!', fromid)
  104.     nick = Substr(fromid, 1, Posex - 1)
  105.     IrcRexxSend('NOTICE' nick verresp, Win)
  106.     Return 'OK'
  107. end
  108.  
  109. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':FINGER') then do
  110.     fingerresp = ":FINGER IceBerg V2.00 default finger response.  I'm too lazy to change it."
  111.     fromid = Strip(xPrefix, L, ':')
  112.     Posex = Pos('!', fromid)
  113.     nick = Substr(fromid, 1, Posex - 1)
  114.     IrcRexxSend('NOTICE' nick fingerresp, Win)
  115.     Return 'OK'
  116. end
  117.  
  118. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':CLIENTINFO') then do
  119.     fingerresp = ":CLIENTINFO GammaTech IRC SuperChilled by IceBerg V2.00."
  120.     fromid = Strip(xPrefix, L, ':')
  121.     Posex = Pos('!', fromid)
  122.     nick = Substr(fromid, 1, Posex - 1)
  123.     IrcRexxSend('NOTICE' nick fingerresp, Win)
  124.     Return ''
  125. end
  126.  
  127. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':ECHO') then do
  128.     echoresp = ":ECHO" xRest || ""
  129.     fromid = Strip(xPrefix, L, ':')
  130.     Posex = Pos('!', fromid)
  131.     nick = Substr(fromid, 1, Posex - 1)
  132.     IrcRexxSend('NOTICE' nick echoresp, Win)
  133.     Return ''
  134. end
  135.  
  136. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':PING') then do
  137.     fromid = Strip(xPrefix, L, ':')
  138.     Posex = Pos('!', fromid)
  139.     nick = Substr(fromid, 1, Posex - 1)
  140.     IrcRexxSend('NOTICE' nick "PONG!", Win) /* Change the "PONG!" to personalize your ping response. */
  141.     Return 'OK'
  142. end
  143.  
  144. if(Cmd='PRIVMSG' & Chan = Us & Nick = ':TIME') then do
  145.     timenow = Date("N") Time("C") 
  146.     timeresp = ":TIME" timenow "(shouldn't you get your own watch??)"|| ""
  147.     fromid = Strip(xPrefix, L, ':')
  148.     Posex = Pos('!', fromid)
  149.     nick = Substr(fromid, 1, Posex - 1)
  150.     IrcRexxDisplay("*** CTCP TIME (" || nick || ")", Win)
  151.     IrcRexxSend('NOTICE' nick timeresp, Win)
  152.     Return ''
  153. end
  154.  
  155. /*********************************************************************/
  156. /* Here we're getting all the nicks for channel that we previously   */
  157. /* specified, writing those nicks to an array and then send the msg  */
  158. /* to those nicks                                                    */
  159. /*********************************************************************/
  160.  
  161. if(yCmd='353' & Value('walling',,Pool) = 'ON') then do
  162.     names. = ''
  163.     names.0 = 0
  164.     cnt = 0
  165.            nickone = Strip(yWall,L,':')
  166.            nickpool = nickone yWall1
  167.     do until Nickpool = ''
  168.            parse var Nickpool tmpWord Nickpool
  169.            cnt = cnt + 1
  170.            names.cnt = tmpWord
  171.            names.0 = cnt
  172.     end
  173.     do cnt = 1 to cnt
  174.         if (Pos("@",names.cnt) = 1) then do   
  175.            names.cnt = Strip(names.cnt,L,'@')
  176.         end
  177.     end
  178.     nickstr = names.1
  179.     do cnt = 2 to cnt
  180.         nickstr = nickstr || ',' || names.cnt
  181.     end
  182.            Tempvar = Value('wallmsg',,Pool)
  183.            Strip(nickstr,B,",")
  184.            IrcRexxCommand('/msg' nickstr TempVar,Win)
  185.     Value(walling,'OFF',Pool)
  186.     Return 
  187. end
  188.  
  189. /*********************************************************************/
  190. /* Here we're getting all the channel operators for the channel that */
  191. /* we previously specified, writing their nicks to an array and      */
  192. /* then send the msg to those nicks                                  */
  193. /*********************************************************************/
  194.  
  195. if(yCmd='353' & Value('walloping',,Pool) = 'ON') then do
  196.     names. = ''
  197.     names.0 = 0
  198.     cnt = 0
  199.     nickone = Strip(yWall,L,':')
  200.     nickpool = nickone yWall1
  201.     do until Nickpool = ''
  202.            parse var Nickpool tmpWord Nickpool
  203.            cnt = cnt + 1
  204.            names.cnt = tmpWord
  205.            names.0 = cnt
  206.     end
  207. nickstr = ''
  208.     do cnt = 1 to cnt
  209.         if (Pos("@",names.cnt) = 1) then do   
  210.            cleannick = Strip(names.cnt,L,'@')
  211.            nickstr = nickstr || cleannick || ','
  212.         end
  213.     end
  214.     Tempvar = Value('wallmsg',,Pool)
  215.     Strip(nickstr,B,",")
  216.     IrcRexxCommand('/msg' nickstr TempVar,Win)
  217.     Value(walloping,'OFF',Pool)
  218.     Return 
  219. end
  220.  
  221. /*********************************************************************/
  222. /* Handling the incoming channel stats info for display              */
  223. /*********************************************************************/
  224.  
  225. if (Cmd='353' & Value('cstating',,Pool) = 'ON') then do
  226.     Parse Var xRest channel nicks
  227.     nickcount = Words(nicks)
  228.     opcount = '0'
  229.     marker = Pos('@', nicks)
  230.     if (marker = '0') then do
  231.         opcount = 'None'
  232.     end
  233.     else do
  234.         do until marker = '0'
  235.             marker = Pos('@', nicks, marker + 1)
  236.             opcount = opcount + 1
  237.         end
  238.     end
  239.     IrcRexxDisplay(Copies('*',60),Win)
  240.     IrcRexxDisplay('*' Center('Stats for' channel ':',58) '*',Win)
  241.     IrcRexxDisplay('*' Center('' nickcount 'visible People',58) '*',Win)
  242.     IrcRexxDisplay('*' Center('' opcount 'Channel Operators',58) '*',Win)
  243.     IrcRexxDisplay(Copies('*',60),Win)
  244.     Return ""
  245. end
  246.  
  247. if (Cmd = '324' & Value('cstating',,Pool) = 'ON') then do
  248.     modes = Strip(yRest,L,'+')
  249.     IrcRexxDisplay('*' Center('Modes for' yNick ':' modes,58) '*',Win)
  250.     Return ""
  251. end
  252.  
  253. if (Cmd = '321' & Value('cstating',,Pool) = 'ON') then do
  254.     Junk = yRest
  255.     Return ""
  256. end
  257.  
  258.  
  259. /*********************************************************************/
  260. /* This was added to suppress the Created Time stamp on Undernet till */
  261. /* I can figure out how to convert that time code to something more   */
  262. /* readable by humans                                                 */
  263. /*********************************************************************/
  264.  
  265. if (Cmd = '329' & Value('cstating',,Pool) = 'ON') then do
  266.     Junk = yRest
  267.     Return ""
  268. end
  269.  
  270. if (Cmd = '322' & Value('cstating',,Pool) = 'ON') then do
  271.     nicktotal = yRest
  272.     topic = yWall yWall1
  273.     topic = Strip(topic, L, ':')
  274.     if (topic = '') then do
  275.         IrcRexxDisplay('*' Center('' yRest 'Total people',58) '*',Win)
  276.         IrcRexxDisplay('*' Center('Topic for' yNick 'is:',58) '*',Win)
  277.         IrcRexxDisplay('*' Center(' No topic has been set!',58) '*',Win)
  278.         IrcRexxDisplay(Copies('*',60),Win)
  279.     end
  280.     else do
  281.         if (Length(topic) > 56) then do
  282.             wordcount = Words(topic)
  283.             halfcount = wordcount % 2
  284.             firsthalf = SubWord(topic, 1, halfcount)
  285.             secondhalf = Subword(topic, halfcount + 1) 
  286.             IrcRexxDisplay('*' Center('' yRest 'Total people',58) '*',Win)
  287.             IrcRexxDisplay('*' Center('Topic for' yNick 'is:',58) '*',Win)
  288.             IrcRexxDisplay('*' Center(firsthalf,56) '*',Win)
  289.             IrcRexxDisplay('*' Center(secondhalf,58) '*',Win)
  290.             IrcRexxDisplay(Copies('*',60),Win)
  291.         end
  292.         else do
  293.             IrcRexxDisplay('*' Center('' yRest 'Total people',58) '*',Win)
  294.             IrcRexxDisplay('*' Center('Topic for' yNick 'is:',58) '*',Win)
  295.             IrcRexxDisplay('*' Center(topic,56) '*',Win)
  296.             IrcRexxDisplay(Copies('*',60),Win)
  297.         end
  298.     end
  299.     Value('cstating','OFF',Pool)
  300.     Return ""
  301. end
  302.  
  303. /*********************************************************************/
  304. /* Decrypt incoming /crypt messages from other IceBerg users         */
  305. /*********************************************************************/
  306.  
  307. if (Cmd = 'PRIVMSG' & Nick = ":#IB2.0#") then do
  308.         By = substr(xPrefix,2)
  309.         Posex = pos('!',By)
  310.         By = substr(By,1,posex - 1)
  311.     xice = "abcdefghijklmnopqrstuvwxyz1234567890,.-('"
  312.     yice = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ )?@!#$*&=+\/"'
  313.     icex = "Q2W* (J'K9aFs=df)gz7cE,mR/TltC+vb#yZu6UI@"
  314.     icey = 'OHP!L.N4xM?qw"e3Gr5-A1SnD$B\YiX&o8pVhj0k'
  315.         cryptout = icex || icey
  316.         cryptin = xice || yice
  317.     instr = xRest
  318.         result = Translate(instr, cryptin, cryptout)
  319.         IrcRexxDisplay("#IB2.0# *" || By || "-->" result,Win)
  320.     Return ''
  321. end
  322.  
  323. /*********************************************************************/
  324. /* Here we're getting all the servers, stopping the process at the   */
  325. /* the 365 message and then writing the array out to a file.         */
  326. /* This creates a servers.lst file for later use with /findsplit     */
  327. /*********************************************************************/
  328.  
  329. if (Cmd = '364' & Value('srvrget',,Pool) = 'ON') then do
  330.     tempcnt = Value('cnt',,Pool) + 1
  331.     Value('cnt',tempcnt,Pool)
  332.     Value('srvrs.'tempcnt,yNick,Pool)
  333.     Return ''
  334. end
  335.  
  336. if (Cmd = '365' & Value('srvrget',,Pool) = 'ON') then do
  337.     Value('srvrget','OFF',Pool)
  338.     IrcRexxCommand('/WRITESVR',Win)
  339.     Return ''
  340. end
  341.  
  342. /*********************************************************************/
  343. /* Here we're getting all the current servers, stopping the process  */
  344. /* at the the 365 message and then writing the array out to a file.  */
  345. /* This creates a current.lst file for later use with /findsplit     */
  346. /*********************************************************************/
  347.  
  348. if (Cmd = '364' & Value('getcurr',,Pool) = 'ON') then do
  349.     tempcnt = Value('currcnt',,Pool) + 1
  350.     Value('currcnt',tempcnt,Pool)
  351.     Value('currsvrs.'tempcnt,yNick,Pool)
  352.     Return ''
  353. end
  354.  
  355. if (Cmd = '365' & Value('getcurr',,Pool) = 'ON') then do
  356.     Value('getcurr','OFF',Pool)
  357.     IrcRexxCommand('/WRITECURRSVR',Win)
  358.     Return ''
  359. end
  360.  
  361. /*********************************************************************/
  362. /* Handle all Auto-op'ing functions for any JOIN msgs received.      */
  363. /*********************************************************************/
  364.  
  365. if (Cmd = 'JOIN' & Value('autoop',,Pool) = 'ON') then do
  366.     userId = Prefix
  367.     Posex = Pos('!', userId)
  368.     nickname = SubStr(userId, 2, Posex - 2)
  369.     Strip(nickname, T, '!')
  370.     do while (Lines('autoop.lst') = 1)
  371.         userline = LineIn('autoop.lst')
  372.         Parse Upper Var userline user channel
  373.         Chan = Strip(Chan, L, ':')
  374.         opok = IrcRexxWildCard(user, Prefix)
  375.         chanok = IrcRexxWildCard(channel, Chan)
  376.         if (opok = 'MATCH') & (chanok = 'MATCH') then do
  377.             IrcRexxSend('MODE' Chan '+o' nickname, Win)
  378.         end
  379.     end 
  380.     Return 'OK'
  381. end
  382.  
  383. /*********************************************************************/
  384. /* XDCC by Armin Kunaschik (ADC) frequently on #os/2ger and #os/2    */
  385. /* 12.1.1996 Version 1.2 Freeware                                    */
  386. /* NO WARRANTY    Use at your own risk!                              */
  387. /* you need the following files:                                     */
  388. /* fileist.txt - list of available files (syntax below)              */
  389. /* users       - list of users who don't need to enter the password  */
  390. /*               1 line = 1 user!                                    */
  391. /* password    - the password for XDCC access                        */
  392. /*                                                                   */
  393. /* History:                                                          */
  394. /* 1.0 initial release                                               */
  395. /* 1.2 Authorization added                                           */
  396. /* 1.0 Problems with EXPOSE removed                                  */
  397. /* normal XDCC with authorization: set SecureXDCC =1                 */
  398. /*********************************************************************/
  399. /* I have adapted this code to integrate it with IceBerg.  During    */
  400. /* that process I decided to leave off the secure functions until I  */
  401. /* can figure them out myself.  The code here absolutely belongs to  */
  402. /* Armin.  I should have the secure side of things figured out soon. */
  403. /* and will add it into the next release of IceBerg.  I also tweaked */
  404. /* the code to my style of writing REXX and to clean up what I       */
  405. /* personally consider to be somewhat of extra work in the code.     */
  406. /*********************************************************************/
  407.  
  408. if (Cmd = 'PRIVMSG' & Chan = Us & Nick = ':XDCC') then do
  409.     FileList = "FileList.txt" 
  410.     IrcRexxDisplay("XDCC" yRest "received from" xPrefix, Win)
  411.     parse upper arg Win Us Prefix Cmd Chan Nick Func Num Passwd
  412.     From = Substr(Prefix,2)
  413.     posex = pos('!',From)
  414.     From = Substr(From,1, posex - 1)
  415. Select
  416. When Func = 'LIST' then do  /*  *** LIST command ***  */
  417.     IrcRexxDisplay("LIST "From,Win)
  418.     LineNo=0
  419.     do while Lines(FileList)
  420.         Fileline = LineIn(FileList)
  421.         if Fileline = "" then leave
  422.         LineNo = LineNo + 1
  423.         Parse Var Fileline Filename Filedesc
  424.         FileName2 = FileSpec("N",FileName)
  425.         FileSize = Stream(FileName,"C","QUERY SIZE")
  426.         IrcRexxCommand("/msg" From "" LineNo || ":" FileDesc "|" Filename2 "[" || FileSize || " bytes]", Win)
  427.     End
  428.     IrcRexxCommand("/MSG "From" To get a file type /MSG "Us" XDCC SEND number", Win)
  429.     Return ""
  430. end
  431. /* SEND command */
  432. When Func = 'SEND' then do
  433.     If Num = "" then do
  434.         IrcRexxCommand("/MSG" From "Ooops, you forgot the file number", Win)
  435.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC SEND N to get file with number N",Win)
  436.         Return ""
  437.     End
  438.     else do
  439.         LineNo = 0
  440.         do while Lines(FileList)
  441.             Fileline = LineIn(FileList)
  442.             if Fileline = "" then leave
  443.             LineNo = LineNo + 1
  444.             Parse Var Fileline Filename Filedesc
  445.             if LineNo = Num then do
  446.                 IrcRexxCommand("/DCC SEND" From FileName, Win)
  447.                 logentry = Date('N') Time('C') FileName "sent to" xPrefix 
  448.                 Lineout("xdcc.log", logentry)
  449.                 Lineout("xdcc.log")
  450.                 Return ""
  451.             End
  452.         End
  453.         IrcRexxCommand("/MSG" From "This File is not available! Range:[1.." LineNo "]", Win)
  454.         Return ""
  455.     end
  456. end
  457.  
  458. /* HELP routine */
  459.     When Func = 'HELP' then do
  460.         IrcRexxCommand("/MSG" From "Available Commands are:",Win)
  461.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC LIST for available files",Win)
  462.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC SEND N to get file with number N",Win)
  463.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC HELP for help",Win)
  464.         Return ""
  465.     end
  466.  
  467.     When Func = "" then do
  468.         IrcRexxCommand("/MSG" From "Available Commands are:",Win)
  469.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC LIST for file list",Win)
  470.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC SEND N to get file with number N",Win)
  471.         IrcRexxCommand("/MSG" From "/MSG" Us "XDCC HELP for help",Win)
  472.         Return ""
  473.     end
  474.  
  475.     Otherwise do
  476.         IrcRexxCommand("/MSG" From "Unknown Command! Try: XDCC HELP",Win)
  477.         Return ""
  478.     end
  479.     Return "OK"
  480. End
  481. end
  482. /*********************************************************************/
  483. /* Handle the kick/ban so get rid of people we don't want in the     */
  484. /* the current channel.                                              */
  485. /*********************************************************************/
  486.  
  487. if Cmd = '302' & Value('kbanning',,Pool) = 'ON' then do
  488.     channel = Value('kbanchan',, Pool)
  489.     reason = Value('kbanreason',, Pool)
  490.     if (reason = '') then do
  491.         reason = 'IceBerg V 2.00 KickBan'
  492.     end
  493.     testnick = Nick
  494.     testnick = Strip(Nick, L, ':')
  495.     Posit = Pos('=', testnick)
  496.     testnick = SubStr(testnick, 1, Posit - 1)
  497.     if testnick = Value('kbannick',,Pool) then do
  498.         Posex = Pos('=', xNick)
  499.         userId = Substr(xNick, Posex + 2)
  500.         userId = Strip(userId, L, '~')
  501.         Posex1 = LastPos('.', userId)
  502.         Posex2 = LastPos('.', userId, Posex1 - 1)
  503.         if (Posex2 = '0') then do
  504.             Posex2 = Pos('@', userId)
  505.         end
  506.         Posex3 = Pos('@', userId)
  507.         user = SubStr(userId, 1, Posex3)
  508.         host = SubStr(userId, Posex2 + 1)
  509.         banId = "*!*" || user || "*" || host
  510.         IrcRexxCommand('/mode' channel '+b' banId, Win)
  511.         IrcRexxCommand('/kick' channel testnick reason, Win) 
  512.         Value('kbanning','OFF',Pool)
  513.         Value('kbannick', '', Pool)
  514.         Value('kbanchan', '', Pool)
  515.         Value('kbanreason', '', Pool)
  516.     end
  517.     else do
  518.     end
  519.     Return
  520. end
  521.  
  522. /*********************************************************************/
  523. /* Handle NOTICE's so they are descernable versus PRIVMSG's          */
  524. /*********************************************************************/
  525.  
  526. if (Cmd = 'NOTICE' & Chan = Us) then do
  527.     Flag = Pos('', xNick)
  528.     if (Flag = 0) then do
  529.         fromid = Strip(xPrefix, L, ':')
  530.         Posex = Pos('!', fromid)
  531.         fromnick = Substr(fromid, 1, Posex - 1)
  532.         xNick = Strip(xNick, L, ":")
  533.         IrcRexxDisplay("+" || fromnick || "+" xNick xRest, Win)
  534.         Return
  535.     end
  536.     else do
  537.     end
  538. end
  539.  
  540. /*********************************************************************/
  541. /* We don't care about this message so return a non-null string so   */
  542. /* that it will be processed normally.                               */
  543. /*********************************************************************/
  544.  
  545. Return "OK"
  546.  
  547.  
  548.