Monitor Nick

By Jamiie on Feb 08, 2009

This snippet monitor's a nick set in %mnick.

Usage:
/monitor = starts monitoring a nick
/unmonitor = stops monitoring the nick set
/view = opens a window containing all the messages sent by the nick being monitored

You can also use the menu by right clicking a nick and clicking Monitor Nick/Unmonitor Nick. View logs is also in the menu.

This was requested by someone.

on *:text:*:#: {
  if ($nick == %mnick) {
    write monitor.txt $+ ($chr(40), $asctime(mmm/dd/yyyy),$chr(41)) $+($chr(40),$time(hh:nn:ss TT),$chr(41)) $+($chr(40),$nick,$chr(41)) $1-
  }
}
on *:text:*:?: {
  if ($nick == %mnick) {
    write monitor.txt $+($chr(40), $asctime(mmm/dd/yyyy),$chr(41)) $+($chr(40),$time(hh:nn:ss TT),$chr(41)) $+($chr(40),$nick,$chr(41)) $1-
  }
}

alias view { if $isfile(monitor.txt) { window -e @Monitoring | loadbuf -ip @Monitoring monitor.txt } }

alias monitor {
  if (!%mnick) {
    set %mnick $1
    echo -a $1 is now being monitored.
  }
  elseif ($1 == %mnick) {
    echo -a %mnick is already being monitored.
  }
}

alias unmonitor {
  if (!%mnick) {
    echo -a There is no one being monitored.
  }
  else {
    write -c monitor.txt
    echo -a %mnick not being monitored now.
    unset %mnick
  }
}

menu menubar,nicklist { 
  Monitor Nick
  .Monitor Nick:/monitor $$1
  .Unmonitor Nick:/unmonitor $$1
  .View:/view
}

Comments

Sign in to comment.
Jamiie   -  Feb 09, 2009

Updated.

Added menu as TheWhistler said, works fine.
Thank's TheWhistler.

 Respond  
TheWhistler   -  Feb 09, 2009

nice one but could it be made to monitor more than just 1 nick at the time,say u wanted to monitor 3 nicks ?? 6/10 also

may want to add this at the end of it, it works for me

menu menubar,nicklist {
Monitor Nick
.Monitor Nick:/monitor $$1
.Unmonitor Nick:/unmonitor $$1
.View:/view
}

 Respond  
Kirby   -  Feb 08, 2009

Pretty neat Jamiie. :p

Earlier today, I made a script somewhat similar to what you did, but I used @windows with /aline for my own inputs and other peoples' text.

6/10 from me too.

 Respond  
Aucun50   -  Feb 08, 2009

6/10 not really useful as i see but its neat

 Respond  
Jamiie   -  Feb 08, 2009

Thanks for the comment, rate it? :)

 Respond  
Aucun50   -  Feb 08, 2009

Here was it saves as "monitor.txt($chr(40)," other then that works good.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.