ircN for mIRC — File Browser

ircNformIRCv6.0 / ircNformIRCv6.0 / ircn / ADDON / NICKCOMP.MRC

NICKCOMP.MRC — 21.18 KB — Download this file

;=+= elite nick completion by delusion_ (v3.0)
;=+= email me w/bugs: delusion_@mindless.com

;description: complete configurabity. this is probably the best
;             nick completion script out there hands down.

;FIRST TIME LOADING: you must part/rejoin every channel you're on for this
;to work properly.

menu channel {
  nick completion v3.0
  .On { set %nickcomp on | echo -a 4*** nick completion has been turned ON. | halt }
  .Off { set %nickcomp off | echo -a 4*** nick completion has been turned OFF. | halt }
  .Uninstall { set %nickcomp off | .disable #nickialupdate | set %nch : | echo -a 4*** nick completion has been uninstalled. | echo -a 4*** to reload this addon, type /load -rs nickcomp.mrc | .unload -rs nickcomp.mrc | halt }
  .-
  .Activation Char { echo -a 4*** activation character is currently %nicka | echo -a 4*** DO NOT USE ; AS AN ACTIVATION CHARACTER! | set %nicka $$?="enter activation char:" | echo -a 4*** activation character is now set to %nicka - to use nick completion, type nameofuser $+ %nicka msg goes here | halt }
  .Type
  ..Presets (overrides Custom Mode)
  ...Preset 1 (old school) { unset %nickrandom | set %nicktype 1 | echo -a 4*** nick completion type set to: [testing]: blah | halt }
  ...Preset 2 (plain) { unset %nickrandom | set %nicktype 2 | echo -a 4*** nick completion type set to: [testing]: blah | halt }
  ...Preset 3 (crackrock) { unset %nickrandom | set %nicktype 3 | echo -a 4*** nick completion type set to: testing: blah | halt }
  ...Preset 4 (odie-x's) { unset %nickrandom | set %nicktype 4 | echo -a 4*** nick completion type set to: [testing]: blah | halt }
  ...Preset 5 (old school 2) { unset %nickrandom | set %nicktype 5 | echo -a 4*** nick completion type set to: [testing]: blah | halt }
  ...Preset 6 (k-lined's (plain 2)) { unset %nickrandom | set %nicktype 6 | echo -a 4*** nick completion type set to: testing: blah | halt }
  ...Preset 7 (k-lined's (very bold)) { unset %nickrandom | set %nicktype 7 | echo -a 4*** nick completion type set to: [testing]: blah | halt }
  ...Preset 8 (mey0u's (slanted)) { unset %nickrandom | set %nicktype 8 | echo -a 4*** nick completion type set to: /testing\: blah | halt }
  ...Preset 9 (mey0u's (dos prompt)) { unset %nickrandom | set %nicktype 9 | echo -a 4*** nick completion type set to: C:\#channel\testing> blah | halt }
  ...Preset 10 (delusion_'s (b00!)) { unset %nickrandom | set %nicktype 10 | echo -a 4*** nick completion type set to: (testing): blah | halt }
  ...-
  ...Show Examples { /nickexamples | halt }
  ..-
  ..Custom Mode (overrides Presets) { unset %nickrandom | set %nicktype custom | echo -a 4*** nick completion type set to custom. | halt }
  ..Custom Settings
  ...left bracket
  ....bold
  .....( { set %nick.leftbracket ( | echo -a 4*** left bracket set to: %nick.leftbracket | halt }
  .....[ { set %nick.leftbracket [ | echo -a 4*** left bracket set to: %nick.leftbracket | halt } 
  ....regular
  .....( { set %nick.leftbracket ( | echo -a 4*** left bracket set to: %nick.leftbracket | halt }
  .....[ { set %nick.leftbracket [ | echo -a 4*** left bracket set to: %nick.leftbracket | halt } 
  ....underline
  .....( { set %nick.leftbracket ( | echo -a 4*** left bracket set to: %nick.leftbracket | halt }
  .....[ { set %nick.leftbracket [ | echo -a 4*** left bracket set to: %nick.leftbracket | halt } 
  ....bold/underline
  .....( { set %nick.leftbracket ( | echo -a 4*** left bracket set to: %nick.leftbracket | halt }
  .....[ { set %nick.leftbracket [ | echo -a 4*** left bracket set to: %nick.leftbracket | halt } 
  ....-
  ....custom { set %nick.leftbracket $$?="left bracket?" | echo -a 4*** left bracket set to: %nick.leftbracket | halt }
  ...right bracket
  ....bold
  .....) { set %nick.rightbracket ) | echo -a 4*** right bracket set to: %nick.rightbracket | halt }
  .....] { set %nick.rightbracket ] | echo -a 4*** right bracket set to: %nick.rightbracket | halt } 
  ....regular
  .....) { set %nick.rightbracket ) | echo -a 4*** right bracket set to: %nick.rightbracket | halt }
  .....] { set %nick.rightbracket ] | echo -a 4*** right bracket set to: %nick.rightbracket | halt } 
  ....underline
  .....) { set %nick.rightbracket ) | echo -a 4*** right bracket set to: %nick.rightbracket | halt }
  .....] { set %nick.rightbracket ] | echo -a 4*** right bracket set to: %nick.rightbracket | halt } 
  ....bold/underline
  .....) { set %nick.rightbracket ) | echo -a 4*** right bracket set to: %nick.rightbracket | halt }
  .....] { set %nick.rightbracket ] | echo -a 4*** right bracket set to: %nick.rightbracket | halt } 
  ....-
  ....custom { set %nick.rightbracket $$?="right bracket?" | echo -a 4*** right bracket set to: %nick.rightbracket | halt }
  ...colon
  ....bold
  .....colon { set %nick.colon : | echo -a 4*** colon set to: %nick.colon | halt }
  .....comma { set %nick.colon , | echo -a 4*** colon set to: %nick.colon | halt } 
  ....regular
  .....colon { set %nick.colon : | echo -a 4*** colon set to: %nick.colon | halt }
  .....comma { set %nick.colon , | echo -a 4*** colon set to: %nick.colon | halt } 
  ....underline
  .....colon { set %nick.colon : | echo -a 4*** colon set to: %nick.colon | halt }
  .....comma { set %nick.colon , | echo -a 4*** colon set to: %nick.colon | halt } 
  ....bold/underline
  .....colon { set %nick.colon : | echo -a 4*** colon set to: %nick.colon | halt }
  .....comma { set %nick.colon , | echo -a 4*** colon set to: %nick.colon | halt } 
  ....-
  ....custom { set %nick.colon $$?="colon?" | echo -a 4*** colon set to: %nick.colon | halt }
  ...middle effect
  ....odie-x { set %nick.effect odie-x | echo -a 4*** middle effect set to odie-x style. | halt }
  ....bitch-x { set %nick.effect bitch-x | echo -a 4*** middle effect set to bitch-x style. | halt }
  ....crackrock { set %nick.effect crackrock | echo -a 4*** middle effect set to crackrock style. | halt }
  ....cool underline { set %nick.effect underline | echo -a 4*** middle effect set to cool underline style. | halt }
  ....none { set %nick.effect none | echo -a 4*** middle effect set to none. | halt }
  ..Show Custom Settings { /nickcustom | halt }
  ..Reset Custom Settings { set %nick.leftbracket [ | set %nick.rightbracket ] | set %nick.colon : | set %nick.effect none | echo -a 4*** custom nick completion settings have been reset. | halt }
  ..-
  ..Random { set %nickrandom yes | echo -a 4*** nick completion type set to random. | halt }
  .Style
  ..All Lowercase { set %nicklower yes | echo -a 4*** nick completion style set to lowercase. | halt }
  ..No Changes { set %nicklower no | echo -a 4*** nick completion style set to no changes. | halt }
}
#nickialupdate off
on 1:JOIN:# {
  if $nick == $me {
    set %joining. [ $+ [ $chan ] ] on
    .who $chan
  }
}
#nickialupdate end
on 1:INPUT {
  if $left($1,1) != / { set %lastsaid $1- }
  if $left($1,1) == / && $1 != /last { set %lastdid $1- }
  if $active ischan && %nickcomp == on {
    if $right($1,1) == ; { /say [ $+ $lower($remove($1,;)) $+ ]: $2- | halt }
    if %nickrandom == yes { set %nicktype $rand(1,8) }
    if %nicktype == 1 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick
          if %nicklower == yes { set %currentline $replace(%currentline,g,g)
            set %currentline $replace(%currentline,j,j)
            set %currentline $replace(%currentline,p,p)
            set %currentline $replace(%currentline,q,q)
            set %currentline $replace(%currentline,y,y)
            set %currentline $replace(%currentline,|,|)
            set %currentline $replace(%currentline,[,[)
            set %currentline $replace(%currentline,],])
          }
          set %temp  $+ $chr(123) $+ 
          set %temp2  $+ $chr(125) $+ 
          set %currentline $replace(%currentline,$chr(123),%temp)
          set %currentline $replace(%currentline,$chr(125),%temp2)
          unset %temp
          unset %temp2
          if %nicklower == yes { say [ $+ $lower(%currentline) $+ ]: $2- }
          if %nicklower == no { say [ $+ %currentline $+ ]: $2- }
          unset %currentline
          halt
        }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 2 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline [ $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ ]:
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 3 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          if %nicklower == yes { set %currentline $effect($lower($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick)) $+ : }
          if %nicklower == no { set %currentline $effect($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) $+ : }
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 4 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline $bu($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick)
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 5 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick
          if %nicklower == yes { set %currentline $replace(%currentline,g,g)
            set %currentline $replace(%currentline,j,j)
            set %currentline $replace(%currentline,p,p)
            set %currentline $replace(%currentline,q,q)
            set %currentline $replace(%currentline,y,y)
            set %currentline $replace(%currentline,|,|)
            set %currentline $replace(%currentline,[,[)
            set %currentline $replace(%currentline,],])
          }
          set %temp  $+ $chr(123) $+ 
          set %temp2  $+ $chr(125) $+ 
          set %currentline $replace(%currentline,$chr(123),%temp)
          set %currentline $replace(%currentline,$chr(125),%temp2)
          unset %temp
          unset %temp2
          if %nicklower == yes { say [ $+ $lower(%currentline) $+ ]: $2- }
          if %nicklower == no { say [ $+ %currentline $+ ]: $2- }
          unset %currentline
          halt
        }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 6 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          if %nicklower == yes { set %currentline $addbitchx($lower($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick)) $+ : }
          if %nicklower == no { set %currentline $addbitchx($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) $+ : }
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 7 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline [ $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ ]:
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 8 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline / $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ \:
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 9 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline C:\ $+ # $+ \ $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ >
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == 10 {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline ( $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ ):
          if %nicklower == yes { set %currentline $replace(%currentline,g,g)
            set %currentline $replace(%currentline,j,j)
            set %currentline $replace(%currentline,p,p)
            set %currentline $replace(%currentline,q,q)
            set %currentline $replace(%currentline,y,y)
            set %currentline $replace(%currentline,|,|)
            set %currentline $replace(%currentline,[,[)
            set %currentline $replace(%currentline,],])
          }
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
    if %nicktype == custom {
      if ($right($1,1) == %nicka) && ($left($1,1) != /) && ($left($1,1) != %nicka) { 
        if ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) && ($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick ison $active) {
          set %currentline %nick.leftbracket $+ $ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick $+ %nick.rightbracket $+ %nick.colon
          if %nick.effect == odie-x {
            set %currentline %nick.leftbracket $+ $bu($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) $+ %nick.rightbracket $+ %nick.colon
          } 
          if %nick.effect == crackrock {
            set %currentline %nick.leftbracket $+ $addbitchx($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) $+ %nick.rightbracket $+ %nick.colon
          }
          if %nick.effect == bitch-x {
            set %currentline %nick.leftbracket $+ $effect($ial( [ [ $remove($1,%nicka) $+ ] * ] ,1).nick) $+ %nick.rightbracket $+ %nick.colon
          }
          if %nick.effect == underline {
            set %currentline $replace(%currentline,g,g)
            set %currentline $replace(%currentline,j,j)
            set %currentline $replace(%currentline,p,p)
            set %currentline $replace(%currentline,q,q)
            set %currentline $replace(%currentline,y,y)
            set %currentline $replace(%currentline,|,|)
            set %currentline $replace(%currentline,[,[)
            set %currentline $replace(%currentline,],])
          }
          if %nicklower == yes { say $lower(%currentline) $2- }
          if %nicklower == no { say %currentline $2- }
        unset %currentline | halt }
        else { echo $chan %h there is no such user in the current channel to use nick completion on. | echo $chan %h (to bypass this, use a ; instead of a %nicka $+ ) | halt }
      }
    }
  }
}
alias bu { goto $len($1) | :1 | return [ $+ $1 $+ ]: | :2 | return [ $+ $1 $+ ]: | :3 | return [ $+ $mid($1,1,1) $+  $+ $mid($1,2,1) $+  $+ $mid($1,3,1) $+ ]: | :4 | return [ $+ $mid($1,1,1) $+  $+ $mid($1,2,2) $+  $+ $mid($1,4,1) $+ ]: | :5 | return [ $+ $mid($1,1,1) $+  $+ $mid($1,2,3) $+  $+ $mid($1,5,1) $+ ]: | :6 | return [ $+ $mid($1,1,2) $+  $+ $mid($1,3,2) $+  $+ $mid($1,5,2) $+ ]: | :7
  return [ $+ $mid($1,1,2) $+  $+ $mid($1,3,3) $+  $+ $mid($1,6,2) $+ ]: | :8 | return [ $+ $mid($1,1,2) $+  $+ $mid($1,3,4) $+  $+ $mid($1,7,2) $+ ]: | :9 | return [ $+ $mid($1,1,3) $+  $+ $mid($1,4,3) $+  $+ $mid($1,7,3) $+ ]:
}
alias nickcustom {
  echo -a 4*** Nick Completion Custom Settings:
  echo -a 4*** Left Bracket: %nick.leftbracket
  echo -a 4*** Right Bracket: %nick.rightbracket
  echo -a 4*** Colon: %nick.colon
  echo -a 4*** Middle Effect: %nick.effect
  echo -a 4*** Your nick completion looks like this (without the middle effect):
  echo -a 4*** %nick.leftbracket $+ testing $+ %nick.rightbracket $+ %nick.colon blah blah blah
}
on 1:LOAD {
  set %h 2[12p2]
  set %nicka :
  set %nickver 3.0
  set %nickcomp on
  set %nicktype 3
  set %nicklower no
  set %nick.leftbracket [
  set %nick.rightbracket ]
  set %nick.colon :
  set %nick.effect none
  echo -a 4*** you have just loaded NICK COMPLETION script v $+ %nickver by delusion_ 4***
  if ircN isin %ver {
    echo -a 4*** irc.N version $remove(%ver,ircN) detected,
    echo -a 4*** automatically shutting off auto-ial updating and ircn's nickcomp.
    .disable #nickialupdate
    set %nch ยก
  }
  if ircN !isin %ver {
    echo -a 4*** irc.N not detected. automatically turning on auto-ial updating.
    .enable #nickialupdate
  }
}
alias effect {
  if $len($1-) =< 1 { set %temp  $+ $1- $+  | .timer 1 3 unset %temp | return %temp | halt }
  set %first2 $len($1-) - 2
  set %temp  $+ $left($1-,1) $+  $+ $mid($1-,2,%first2) $+  $+ $right($1-,1) $+ 
  unset %first2
  .timer 1 3 unset %temp
  return %temp
}
alias addbitchx {
  if $len($1-) =< 1 { set %temp  $+ $1- $+  | .timer 1 3 unset %temp | return %temp | halt }
  set %first2 $len($1-) - 2
  set %temp  $+ $left($1-,1) $+  $+ $mid($1-,2,%first2) $+  $+ $right($1-,1) $+ 
  unset %first2
  .timer 1 3 unset %temp
  return %temp
}
alias nickexamples {
  echo -a 4*** nick completion preset 1: [testing]: blah
  echo -a 4*** nick completion preset 2: [testing]: blah
  echo -a 4*** nick completion preset 3: testing: blah
  echo -a 4*** nick completion preset 4: [testing]: blah
  echo -a 4*** nick completion preset 5: [testing]: blah
  echo -a 4*** nick completion preset 6: testing: blah
  echo -a 4*** nick completion preset 7: [testing]: blah
  echo -a 4*** nick completion preset 8: /testing\: blah
  echo -a 4*** nick completion preset 9: C:\#channel\testing> blah
  echo -a 4*** nick completion preset 10: (testing): blah
}
ctcp 1:nickver {
  raw -q notice $nick :NICKVER Nick Completion v $+ %nickver by delusion_. (delusion_@mindless.com)
  halt
}