Jump to content
chain

mIRC Addon

Recommended Posts

  • Administrators
Posted
alias calc { echo -a 12Calculation: $calc($1-) }

;;;;; ################# SHOW UPTIME ---------------------------------------------------------------------------------------
menu channel,nicklist { 
  System Uptime://echo -a 12Uptime:7 $uptime(system,1) | .timerUPTIME 0 3 /uptdate 
}
alias uptdate { titlebar UP: $uptime(system,1) }

;;;;; ################# GET NICK BACK ---------------k--------------------------------------------
on *:UNOTIFY:{
  if ($nick == Eneerge) { /nick Eneerge }
}

alias bw {
  if ($1 == $NULL) { echo -a No Input! | haltdef }
  if ($me ison $1) { 
    if ($2 == $NULL) { echo -a No Input! | haltdef }
    else {
      var %currentword_index = $numtok($2-,32)
      var %inv_word = $NULL
      while (%currentword_index > 0) {
        var %currentword = $gettok($2-,%currentword_index,32)
        var %inv_word

        while ($len(%currentword) > 0) {
          var %inv_word = %inv_word $+ $right(%currentword,1)
          var %currentword = $left(%currentword,-1)
        }

        var %inv_msg = %inv_msg $+ $chr(32) $+ %inv_word

        dec %currentword_index
      }

      /msg $1 %inv_msg
    }
  }
  else {
    var %currentword_index = $numtok($1-,32)
    var %inv_word = $NULL
    while (%currentword_index > 0) {
      var %currentword = $gettok($1-,%currentword_index,32)
      var %inv_word

      while ($len(%currentword) > 0) {
        var %inv_word = %inv_word $+ $right(%currentword,1)
        var %currentword = $left(%currentword,-1)
      }

      var %inv_msg = %inv_msg $+ $chr(32) $+ %inv_word

      dec %currentword_index
    }

    /msg $chan %inv_msg
  }
}

;;;;; ################# Safe Rejoin After Kick -----------------------------------------------------------
on *:KICK:#:{  if ($knick == $me) { .timer 1 5 hop #  } }

;;;;; ################# CHECK FOR UN-USED SERVERS ---------------------------------------------------------------------
alias check {
  var %disconnect = $?!="Would you like to disconnect and close the window? ( $+ $server $+ )" 
  if (%disconnect = $true) { /scid $cid window -c "Status Window" }
}
on me:*:PART:#:{
  if ($chan(0) <= 1) { .timerCHECK 1 1 check }
}

;;;; ################# HEX URL CONVERSION --------------------------------------------------------------------------------
on 1:DNS:{
  var %n = $dns(0)
  echo -a -=4 Found %n addresses - $dns(%n).nick
  while (%n > 0) {
    var %quad1 = $gettok($dns(%n).ip,1,46)
    var %hex1 = $base(%quad1,10,16)

    var %quad2 = $gettok($dns(%n).ip,2,46)
    var %hex2 = $base(%quad2,10,16)

    var %quad3 = $gettok($dns(%n).ip,3,46)
    var %hex3 = $base(%quad3,10,16)

    var %quad4 = $gettok($dns(%n).ip,4,46)
    var %hex4 = $base(%quad4,10,16)

    echo -a ADDRESS: $dns(%n).addr $+ ( $+ $dns(%n).ip $+ ) / 12http:// $+ $longip($dns(%n).ip) / 12 $+(http://0x,%hex1,%hex2,%hex3,%hex4)

    dec %n
  }
  halt
}
;;;; ################ BETTER URL PARSING
;; E-mail parsing
on ^1:HOTLINK:*@*:*: { 
  if (($right($1,4) != .net) || ($right($1,4) != .com) || ($right($1,4) != .org)) { halt } 
  else { return } 
}
;; URLs
on ^1:HOTLINK:*http*:*:{ if (:// isin $1) return | else { halt } }
on ^1:HOTLINK:*.net*:*:{ return }
on ^1:HOTLINK:*.com*:*:{ return }
on ^1:HOTLINK:*.org*:*:{ return }
on ^1:HOTLINK:*.ru*:*:{ return }
on ^1:HOTLINK:*.nl*:*:{ return }
on ^1:HOTLINK:*.biz*:*:{ return }
on 1:HOTLINK:*:*:{ 
  var %url = $1
  var %chr = 5
  while (%chr < 256) {
    if ($chr(%chr) isincs %url) { set %url $remove(%url,$chr(%chr)) }
    inc %chr
    if (%chr == 35) { var %chr = 36 }
    elseif (%chr == 37) { var %chr = 39 }
    elseif (%chr == 43) { var %chr = 59 }
    elseif (%chr == 61) { var %chr = 62 }
    elseif (%chr == 63) { var %chr = 64 }
    elseif (%chr == 65) { var %chr = 91 }
    elseif (%chr == 95) { var %chr = 96 }
    elseif (%chr == 97) { var %chr = 123 }
    elseif (%chr == 126) { var %chr = 127 }
  }
  if (@ isin $1) { run mailto: $+ %url | halt }
  if ((http:// !isin %url) && (https:// !isin %url)) { var %url $puttok(%url,http:// $+ %url,1,32) }
  .url %url
}

;;;; ################# TEXT MANIPULATION --------------------------------------------------------------------------------
;;;; # For channel message
on ^1:TEXT:**:#:{
  var %template [ $+ [ $nick ] ] < $+ $nick $+ 7> $1-

  ; ADD VOICE/OP STATUS TO USER ###
  ; ---------------------------
  if ($nick isop $chan) { var %template [ $+ [ $nick ] ] $puttok(%template [ $+ [ $nick ] ],<14@ $+ $nick $+ 7>, 1,32) }
  elseif ($nick isvoice $chan) { var %template [ $+ [ $nick ] ] $puttok(%template [ $+ [ $nick ] ],<14+ $+ $nick $+ 7>, 1,32) }

  ; HIGHLIGHT MY CURRENT NICKNAME ###
  ; -----------------------------
  var %color 8,2
  var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$me,%color $+ $me $+ )

  ; HIGHLIGHT URLS ### 
  ; --------------
  var %totalURLS $matchtok(%template [ $+ [ $nick ] ],http://,0,32)
  var %totalURLS $calc(%totalURLS + $matchtok(%template [ $+ [ $nick ] ],www.,0,32))
  var %totalURLS $calc(%totalURLS - $matchtok(%template [ $+ [ $nick ] ],http://www.,0,32))

  var %color 12,0
  while (%totalURLS > 0) {
    var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$matchtok(%template [ $+ [ $nick ] ],http://,%totalURLS,32),%color $+ $matchtok(%template [ $+ [ $nick ] ],http://,%totalURLS,32) $+ )
    var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$matchtok(%template [ $+ [ $nick ] ],www.,%totalURLS,32),%color $+ $matchtok(%template [ $+ [ $nick ] ],www.,%totalURLS,32) $+ )
    dec %totalURLS
  }

  ; DISPLAY DATA ###
  ; ------------
  echo -i8 $chan %template [ $+ [ $nick ] ]
  halt
}
;;; # FOR PRIVAGE MESSAGES
on ^1:TEXT:*:?:{
  var %color 8,2
  var %template [ $+ [ $nick ] ] < $+ $nick $+ 7> $1-

  ; HIGHLIGHT MY CURRENT NICKNAME ###
  ; -----------------------------
  var %color 8,2
  var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$me,%color $+ $me $+ )

  ; HIGHLIGHT URLS ###
  ; --------------
  var %totalURLS $matchtok(%template [ $+ [ $nick ] ],http://,0,32)
  var %totalURLS $calc(%totalURLS + $matchtok(%template [ $+ [ $nick ] ],www.,0,32))
  var %totalURLS $calc(%totalURLS - $matchtok(%template [ $+ [ $nick ] ],http://www.,0,32))

  var %color 12,0
  while (%totalURLS > 0) {
    var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$matchtok(%template [ $+ [ $nick ] ],http://,%totalURLS,32),%color $+ $matchtok(%template [ $+ [ $nick ] ],http://,%totalURLS,32) $+ )
    var %template [ $+ [ $nick ] ] $replace(%template [ $+ [ $nick ] ],$matchtok(%template [ $+ [ $nick ] ],www.,%totalURLS,32),%color $+ $matchtok(%template [ $+ [ $nick ] ],www.,%totalURLS,32) $+ )
    dec %totalURLS
  }  


  ; DISPLAY DATA ###
  ; ------------
  echo -i3 $nick %template [ $+ [ $nick ] ]


  ; SET FOCUS TO WINDOW FOR EASY VIEWING ###
  ; ------------------------------------
  if ($active != $nick) { 
    echo -a 7*** 12INCOMING MESSAGE from $nick
    window -a $nick 
  }
  halt
}
on 1:INPUT:#:{
  if (($left($1,1) != /) || ($ctrlenter == $true)) {
    inc %num
    if ($me isop $chan) { var %mymode @ }
    elseif ($me isvoice $chan) { var %mymode + }

    var %template [ $+ [ %num ] ] 14 $+ %mymode $+ 8 $+ $me $+ 7>

    if ($len($1-) > 399) { .msg $active $1-$399 | editbox -a $right($1-,-399) }
    else { .msg $active $1- }
    echo -i8 $chan < $+ %template [ $+ [ %num ] ] $left($1-,399)

    dec %num
    halt
  }
  if (($1 == /me) || ($1 == /describe)) {
    if ($2 == $Null) { Echo -a *** 7Invalid input | halt }
    .describe $chan $2-
    inc %num
    var %template [ $+ [ %num ] ] 7 $+ $me $2- 

    if ($me isop $chan) { echo -i8 $chan * 14@7 $+ %template [ $+ [ %num ] ] }

    else if ($me isvoice $chan) { echo -i8 $chan * 14+7 $+ %template [ $+ [ %num ] ] }
    else { echo -i8 $chan *7 %template [ $+ [ %num ] ] }

    dec %num
    halt
  }
}
on 1:INPUT:?:{
  if (($left($1,1) != /) || ($ctrlenter == $true)) {
    inc %num

    var %template [ $+ [ %num ] ] <12 $+ $me $+ 7>

    .msg $active $1-
    echo -i8 $active %template [ $+ [ %num ] ] $1-
    halt
  }
  if (($1 == /me) || ($1 == /describe)) {
    if ($2 == $Null) { Echo -a *** 7Invalid input | halt }
    .describe $active $2-
    inc %num
    var %template [ $+ [ %num ] ] * 6 $+ $me 

    echo -i8 $active %template [ $+ [ %num ] ] $2-
    dec %num
    halt
  }
}

on ^1:ACTION:**:#:{
  var %template [ $+ [ $nick ] ] $nick $1- 

  if ($nick isop $chan) { echo -i8 $chan *14 @7 $+ %template [ $+ [ $nick ] ] }

  else if ($nick isvoice $chan) { echo -i8 $chan *14 +7 $+ %template [ $+ [ $nick ] ] }

  else { echo -i8 $chan *7 %template [ $+ [ $nick ] ] }

  halt
}
on ^1:ACTION:**:?:{
  var %template [ $+ [ $nick ] ] $nick $1- 

  echo -i8 $nick *7 %template [ $+ [ $nick ] ]
  halt
}

Implements features into mIRC like url highlighting, ip to hex, reverse chat, uptime, getnickback, close redundant connections, safe rejoin, and better text display.  I recommend using with a black background.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...