home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircii30.zip / script / kpstat < prev    next >
Text File  |  1994-07-30  |  1KB  |  57 lines

  1. # This one by Snoopy (hellmond@phoenix.princeton.edu)
  2. #
  3. # Due to the annoying feature [bug] of frequent ServerKills, I updated the
  4. # nkpath script to put serverkills into the status_user variable and to
  5. # display only operkills.
  6. # -- Peter
  7.  
  8. # No Kill Path Script
  9. # ===================
  10. # Original script from YeggMan
  11. # Version for servers 2.7.1* by Nap
  12. # modified for displaying Serverkills in Status_Line by snoopy
  13. # This version works both with old and new 2.7.1e kill formats !
  14. # conversion to 2.2.1 by phone
  15.  
  16. assign _kpath <empty>
  17. alias kpath echo !LASTKILL! Last received KILL Path: $_kpath
  18.  
  19. alias _ridx ^assign function_return $RINDEX(! $0)
  20. alias _is_serv ^assign function_return $INDEX(. $MID($_ridx($0) 512 $0))
  21. alias _opkill xecho -level OPNOTES OPERKILL: by $MID($_ridx($1) 9 $1) for $0 $2-
  22. alias _svkill ^set status_user SERVERKILL: $0 ($1)
  23.  
  24. alias _napEserv {
  25.         ^assign _kpath $12-
  26.         if ( _is_serv($12) > -1 )
  27.     {
  28.         _svkill $8 $10
  29.     }
  30.     {
  31.         _opkill $8 $10 $13-
  32.     }
  33. }
  34.  
  35. alias _napDserv {
  36.         ^assign _kpath $10-
  37.         if ( _is_serv($10) >- 1)
  38.     {
  39.         _svkill $8 $10
  40.     }
  41.     {
  42.         _opkill $8 $10 $11-
  43.     }
  44. }
  45.  
  46. on ^server_notice "% * Notice -- Received KILL*" {
  47.     echo $0-
  48.         if ([$9] == [From])
  49.     {
  50.         _napEserv $0-
  51.     }
  52.     {
  53.         _napDserv $0-
  54.     }
  55. }
  56.