All pastes #939188 Raw Edit

Topic/XDCC catcher

public text v1 · immutable
·published 2008-03-12 02:40 UTC
rendered paste body
;########################################
;# Simple Multi-catcher by twilightNoir #
;########################################
;#
;# Feel free to modify this file, distribute this file, lure lolis with this file, et cetera.
;# By using this script, you understand that I cannot be held accountable for any illegal actions.
;# If you do modify it for the better, do send me a copy. xD
;# 
;# Version 1.02b Basic functionality.
;#
;# What it does: Whenever a bot announces a pack or a topic is changed, this script catches it and
;# echoes the information to the active window. It also outputs to 2 separate windows, so if you have a 
;# crapload of windows, you can see an overview from one.
;#
;# Known issues: Dupe announces on different chans are caught separately, does not catch short announces,
;# and does not alphabetize.
;#
;# Usage: Automatic. Unzip to your mIRC directory and type /load -rs catcher.mrc
;#
;# Coming soon: Interactive windows.
;#
;# Contact: MSN: zgrummons@gmail.com | AIM: zgrummons@gmail.com | e-mail: zgrummons@gmail.com | #news@irc.rizon.net
;#
;########################################

on *:topic:#: {
  if (!$window(@Topics)) { 
    window -bnlk0 -t17 @Topics 
    aline -h @Topics Channel: $chr(9) Users: $chr(9) Topic:
    set %clist $chan(0)
    write -c topiclist.txt
    while (%clist) {
      dec %clist
      if ($calc($line(@Topics,0) % 2 == 1)) { aline @Topics 4 $chan($calc($chan(0) - %clist)) $+ : $chr(9) 9 $nick($chan($calc($chan(0) - %clist)),0) $chr(9)  $chan($calc($chan(0) - %clist)).topic }   
      else { aline @Topics 5 $chan($calc($chan(0) - %clist)) $+ : $chr(9) 3 $nick($chan($calc($chan(0) - %clist)),0) $chr(9)  $chan($calc($chan(0) - %clist)).topic }
      write topiclist.txt $chan($calc($chan(0) - %clist)) -----
    }
    aline @topics ----- $chr(9) ----- $chr(9) -----
    aline @topics New channels: $chr(9) Users: $chr(9) Topic:
  }
  echo -a 7[+] 14Topic change 7[+] [14 $+ $time $+ 7] -3 $network -4 $chan by14 $nick - $1-
  if ($read(topiclist.txt,s,$chan) == $null) {
    write topiclist.txt $chan -----
    if ($calc($line(@Topics,0) % 2 == 1)) { aline -h @topics 4 $chan $+ : $chr(9) 9 $nick($chan,0) $chr(9)  $1- }   
    else { aline -h @topics 5 $chan $+ : $chr(9) 3 $nick($chan,0) $chr(9)  $1- }
  }
  else {
    if ($calc($line(@Topics,0) % 2 == 1)) { rline -h @topics $calc($readn + 1) 4 $chan $+ : $chr(9) 9 $nick($chan,0) $chr(9)  $1- }   
    else { rline -h @topics $calc($readn + 1) 5 $chan $+ : $chr(9) 3 $nick($chan,0) $chr(9)  $1- }
  }
  halt
}

on *:text:*[*]*-*msg*xdcc send*:#: {
  if (!$window(@XDCC)) {
    window -bnlk0 -t20,30 @XDCC
    aline -h @XDCC Nickname: $chr(9) Pack No. $chr(9) Contents:
    write -c xdcc.txt
  }
  echo -a 7[+] 14XDCC 7[+] -3 $network -4 $nick -7 $chan - $1-
  tokenize 93 $1-
  set %rawmsg $2-
  if ($3 != $null) { set %rawmsg $2 $+ ] $+ $3- }
  if ($4 != $null) { set %rawmsg $2 $+ ] $+ $3 $+ ] $+ $4- }
  if ($5 != $null) { set %rawmsg $2 $+ ] $+ $3 $+ ] $+ $4 $+ ] $+ $5- }
  if ($6 != $null) { set %rawmsg $2 $+ ] $+ $3 $+ ] $+ $4 $+ ] $+ $5 $+ ] $+ $6- }
  if ($7 != $null) { set %rawmsg $2 $+ ] $+ $3 $+ ] $+ $4 $+ ] $+ $5 $+ ] $+ $6 $+ ] $+ $7- }
  tokenize 32 %rawmsg 
  if ($7 != $null) { set %pack $7 | set %file $1 }
  if ($8 != $null) { set %pack $8 | set %file $1-2 }
  if ($9 != $null) { set %pack $9 | set %file $1-3 }
  if ($10 != $null) { set %pack $10 | set %file $1-4 }
  if ($11 != $null) { set %pack $11 | set %file $1-5 }
  if ($12 != $null) { set %pack $12 | set %file $1-6 }
  if ($13 != $null) { set %pack $13 | set %file $1-7 }
  if ($calc($line(@XDCC,0) % 2 == 1)) { aline -h @XDCC 5 $nick $chr(9) 3 %pack $chr(9) 14 %file }
  else { aline -h @XDCC 4 $nick $chr(9) 9 %pack $chr(9) 15 %file }
  unset %rawmsg
  halt
}