Top

Join Hilighter v1.3.0


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Jan 21, 2009
Last Updated  Jan 26, 2009
Tags  hilight  join  knoeki  nick  notify  overkill  zomgwtfbbq  zowb 

Introduction

Code:

Kind of elaborate script to show when specific nicks joined which channels, in a custom window.

Idea by DarthMorlock, he asked me to create this and I made it over 9000 times more complicated than what he wanted.

It shows *ALL* channels a nick joins that you are currently in, with timestamps.

there may still be some bugs. if you find, one, please post a comment, or find me on IRC. Kudos, suggestions, and feature requests are also all welcome.

more features && bugs to come ;_)


[b]Usage:[/b]
/jh --help         -- shows all commands.
/jh -a             -- adds a nick to the tracklist.
/jh -d             -- delete a nick from the tracklist.
/jh -c             -- change the output colours.
/jh -l             -- list all nicks on the tracklist.
/jh -r             -- enable/disable automagically re-opening of the window if it was closed.



[b]Version history:[/b]
1.0     -- initial release
1.0.1   -- fixed missing \ in line 27 and 39, as pointed out by CatBox360 in record time ;_)
1.1     -- fixed some small typos here and there, removed the detection of colour codes when
           inputting script colours (just don't use them..), and added a feature to list all
           nicknames.
1.2     -- yeah yeah, 3rd update in less than 24 hours. let's just say I'm never satisfied ;_)
           Not much changed again, except that on start it selects 2 random colours on first run.
1.2.1   -- fixed the version number... >.>
1.3.0   -- Now also shows part messages, and added an option to automagically reopen the window
           on a new hilight, if it was closed before. Also some cosmetic stuff changed slightly.


Grab the Code

on *:START: {
   /set %jh.version 1.3.0
   /window -kngm @join-hilights 1 2
   if ((%jh.c1 == $null) && (%jh.c2 == $null)) {
      /set -u20 %jh.c1.tmp $rand(2,15)
      /set -u20 %jh.c2.tmp $rand(2,15)
      if (%jh.c1.tmp < 10) {
         /set %jh.c1 $+(0,%jh.c1.tmp)
      }
      else {
         /set %jh.c1 $+(,%jh.c1.tmp)
      }
      if (%jh.c2.tmp < 10) {
         /set %jh.c2 $+(0,%jh.c2.tmp)
      }
      else {
         /set %jh.c1 $+(,%jh.c1.tmp)
      }
   }
   if (%jh.wait.time == $null) {
      /set %jh.wait.time 30
   }
   .aline @join-hilights $+(%jh.c2,$time,%jh.c1) 12[14o.O12]14 Join Hilight script %jh.version $+ , $chr(169) 13knoeki 142009. 12[ 13http://zomgwtfbbq.info 12]
   .aline @join-hilights $+(%jh.c2,$time,%jh.c1) 12[14^_^12]14 Type 13/jh --help 14for usage info.
   .aline @join-hilights $+(%jh.c2,$time,%jh.c1) 12[14-.-12]14 Script initialized. report any bugs you find :_)
}
 
on *:JOIN:#: {
   if ($read($scriptdir\jh-nicks.txt, w, $nick) != $null) {
      if (($window(@join-hilights) == $null) && (%jh.reopen == 1)) {
         /window -kngm @join-hilights 1 2
      }
   .aline @join-hilights $+(%jh.c2,$time,%jh.c1) --> $+(%jh.c1,$nick) $+(%jh.c2,joined) $+(%jh.c1,$chan,%jh.c2,.)
   }
}
on *:PART:#: {
   if ($read($scriptdir\jh-nicks.txt, w, $nick) != $null) {
      if (($window(@join-hilights) == $null) && (%jh.reopen == 1)) {
         /window -kngm @join-hilights 1 2
      }
   .aline @join-hilights $+(%jh.c2,$time,%jh.c1) <-- $+(%jh.c1,$nick) $+(%jh.c2,parted) $+(%jh.c1,$chan,%jh.c2,.)
   }
}
alias /jh {
   if ($1 == -a) {
      if ($2 == $null) {
         /echo %jh.c2 You must specify a nick to add.
      }
      elseif ($read($scriptdir\jh-nicks.txt, w, $2) != $null) {
         /echo %jh.c2 This nickname is already on the list.
      }
      else {
         /write $qt($scriptdir\jh-nicks.txt) $2
         /echo %jh.c1 $+ $2 %jh.c2 $+ has been written to $+(%jh.c1,$qt($scriptdirjh-nicks.txt),%jh.c2,.)
      }
   }
   elseif ($1 == -d) {
      if ($2 == $null) {
         /echo %jh.c2 You must specify a nick to remove.
      }
      elseif ($read($scriptdir\jh-nicks.txt, w, $2) == $null) {
         /echo %jh.c2 The nickname you specified is not on the list.
      }
      else {
         /write -ds $2 $qt($scriptdirjh-nicks.txt)
         /echo %jh.c1 $+ $2 %jh.c2 $+ has been removed from $+(%jh.c1,$scriptdir\jh-nicks.txt,%jh.c2,.)
      }
   }
   elseif ($1 == --help) {
      /echo %jh.c2 Usage of the joinhilighter. (version %jh.version $+ ).
      /echo %jh.c2 This script will open a custom window ( $+ %jh.c1 $+ @join-hilights $+ %jh.c2 $+ ), in which it shows which channels certain nicks join.
      /echo %jh.c2 It only shows that for channels you are in yourself.
      /echo %jh.c2 to add a nick to the list: %jh.c1 $+ /jh -a foo
      /echo %jh.c2 to remove a nick from the list: %jh.c1 $+ /jh -d bar
      /echo %jh.c2 to change output colours: %jh.c1 $+ /jh -c colour1 colour2 %jh.c2 $+ (defaults are chosen randomly on first start)
      /echo %jh.c2 to list all tracked nicknames: %jh.c1 $+ /jh -l
      /echo %jh.c2 to change window reopen behaviour: %jh.c1 $+ /jh -r <on|off>
   }
   elseif ($1 == -c) {
      if (($2 != $null) && ($3 != $null)) {
         /set %jh.c1 $+(,$2)
         /set %jh.c2 $+(,$3)
         /echo %jh.c2 Colours have been changed successfully.
      }
      elseif ($2 == random) {
         /set -u20 %jh.c1.tmp $rand(2,15)
         /set -u20 %jh.c2.tmp $rand(2,15)
         if (%jh.c1.tmp < 10) {
            /set %jh.c1 $+(0,%jh.c1.tmp)
         }
         else {
            /set %jh.c1 $+(,%jh.c1.tmp)
         }
         if (%jh.c2.tmp < 10) {
            /set %jh.c2 $+(0,%jh.c2.tmp)
         }
         else {
            /set %jh.c1 $+(,%jh.c1.tmp)
         }
         /echo %jh.c2 Colours have been changed successfully.
      }
      else {
         /echo %jh.c2 You must specify 2 colours.
      }
   }
   elseif ($1 == -k) {
      /echo 00 $+ $decode('*%Q?7U\O*0``))
      /echo 15 $+ $decode('*#TG+B<]*0``)) %jh.c1 $+ ~ %jh.c2 $+ Easter egg... 04<3
      /echo 14 $+ $decode('*"(I7R@B*0``))
   }
   elseif ($1 == -l) {
      if ($read($scriptdir\jh-nicks.txt, 1) != $null) {
         .aline @join-hilights $+(%jh.c2,$time,%jh.c1, -->) %jh.c2 $+ The following nicks are being tracked...:
         /set %jh.list.loop 0
         :listloop
         /inc %jh.list.loop
         .aline @join-hilights $+(%jh.c2,$time,%jh.c1, -->) %jh.c2 $+ %jh.list.loop $+ . %jh.c1 $+ $read($scriptdir\jh-nicks.txt, %jh.list.loop)
         if (%jh.list.loop < $lines($scriptdir\jh-nicks.txt)) {
            goto listloop
         }
         else {
            return
         }
      }
      else {
         /echo %jh.c2 $+ There are no nicks to display.
      }
   }
   elseif ($1 == -r) {
      if ($2 == on) {
         /set %jh.reopen 1
         /echo %jh.c2 $+ The hilights window will now automagically reopen on new join/part hilights.
      }
      elseif ($2 == off) {
         /unset %jh.reopen
         /echo %jh.c2 $+ The hilights window will now not automagically reopen on new join/part hilights.
      }
      else {
         /echo %jh.c2 $+ You have to specify either $+(%jh.c1,on) $+(%jh.c2,or) $+(%jh.c1,off,%jh.c2,.)
   }
   else {
      /echo %jh.c2 $+ Missing parameter. type %jh.c1 $+ /jh --help %jh.c2 for commands.
   }
}
 

Comments

  (0)  RSS

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom