Monitor Window

By supergeo on Sep 24, 2005

I decided to make a snippet which puts different bits of information into a window. It could be useful for IRCops or channel ops. When someone joins or parts a channel you're in or quits, you'll see it. If someone ops or deops someone else you'll see it. If someone kicks someone else you'll see it.

on *:Connect:{ 
  if (%monitor == on) mwindow
}

on *:Rawmode:#:{ 
  if (%monitor == on) {
    if ($1 === +o) Echo 4 -tbf @Monitor $nick Opped $opnick in $chan $+ .
    if ($1 === +h) Echo 4 -tbf @Monitor $nick Half-Opped $hnick in $chan $+ .
    if ($1 === +v) Echo 4 -tbf @Monitor $nick Voiced $vnick in $chan $+ .
    if ($1 === -v) Echo 4 -tbf @Monitor $nick De-Voiced $vnick in $chan $+ .
    if ($1 === -h) Echo 4 -tbf @Monitor $nick De-Half-Opped $hnick in $chan $+ .
    if ($1 === -o) Echo 4 -tbf @Monitor $nick De-Opped $opnick in $chan $+ .
    if ($1 === +i) Echo 4 -tbf @Monitor $nick made $chan Invite Only.
    if ($1 === +m) Echo 4 -tbf @Monitor $nick made $chan Moderated.
    if ($1 === +s) Echo 4 -tbf @Monitor $nick made $chan Secret.
    if ($1 === +p) Echo 4 -tbf @Monitor $nick made $chan Private.
    if ($1 === -i) Echo 4 -tbf @Monitor $nick Unmade $chan Invite Only.
    if ($1 === -m) Echo 4 -tbf @Monitor $nick Unmade $chan Moderated.
    if ($1 === -s) Echo 4 -tbf @Monitor $nick Unmade $chan Secret.
    if ($1 === -p) Echo 4 -tbf @Monitor $nick Unmade $chan Private.
    if ($1 === +b) Echo 4 -tbf @Monitor $nick Banned $bnick from $chan $+ .
    if ($1 === -b) Echo 4 -tbf @Monitor $nick Unbanned $bnick
  }
}
on *:Join:#:{ 
  if (%monitor == on) Echo 4 -tbf @Monitor $nick Joined $chan $+ .
} 
on *:Part:#:{ 
  if (%monitor == on) Echo 4 -tbf @Monitor $nick Parted $chan $+ .
}
on *:Kick:#:{ 
  if (%monitor == on) Echo 4 -tbf @Monitor $nick Kicked $knick from $chan $+ . 
}
on *:Quit:{
  if (%monitor == on) Echo 4 -tbf @Monitor $nick Quit.
}

menu * {
  $iif(%monitor,Turn Monitor Off, Turn Monitor On): Monitor
}

alias monitor {
  if (%monitor) unset %monitor
  else { set %monitor on | mwindow }
  }

alias mwindow {
 Window @Monitor
 Echo 9 @Monitor Monitor Start Time: $time $adate
 Log on @Monitor 
}

Comments

Sign in to comment.
napa182   -  Mar 31, 2008

Gecko321 use the code tags to post code.

code here

 Respond  
Gecko321   -  Mar 30, 2008

replace this line in the update

var %Mode = $mid(%mode,1,1) $+ $Mid(%mode,%a,1)

with this

var %Mode = $mid($1,1,1) $+ $Mid($1,%a,1)

 Respond  
Gecko321   -  Mar 30, 2008

if you change the On Rawmode to

on *:Rawmode:#:{
var %a = 2
if (%monitor == on) {
while (%a <= $0) {
var %Nick = [ $ [ $+ [ %a ] ] ]
var %Mode = $mid(%mode,1,1) $+ $Mid(%mode,%a,1)
if (%Mode === +o) Echo 4 -tbf @Monitor $nick Opped %Nick in $chan $+ .
if (%Mode === +h) Echo 4 -tbf @Monitor $nick Half-Opped %Nick in $chan $+ .
if (%Mode === +v) Echo 4 -tbf @Monitor $nick Voiced %Nick in $chan $+ .
if (%Mode === -v) Echo 4 -tbf @Monitor $nick De-Voiced %Nick in $chan $+ .
if (%Mode === -h) Echo 4 -tbf @Monitor $nick De-Half-Opped %Nick in $chan $+ .
if (%mode === -o) Echo 4 -tbf @Monitor $nick De-Opped %Nick in $chan $+ .
if (%mode === +i) Echo 4 -tbf @Monitor $nick made $chan Invite Only.
if (%mode === +m) Echo 4 -tbf @Monitor $nick made $chan Moderated.
if (%mode === +s) Echo 4 -tbf @Monitor $nick made $chan Secret.
if (%mode === +p) Echo 4 -tbf @Monitor $nick made $chan Private.
if (%mode === -i) Echo 4 -tbf @Monitor $nick Unmade $chan Invite Only.
if (%mode === -m) Echo 4 -tbf @Monitor $nick Unmade $chan Moderated.
if (%mode === -s) Echo 4 -tbf @Monitor $nick Unmade $chan Secret.
if (%mode === -p) Echo 4 -tbf @Monitor $nick Unmade $chan Private.
if (%mode === +b) Echo 4 -tbf @Monitor $nick Banned %Nick from $chan $+ .
if (%mode === -b) Echo 4 -tbf @Monitor $nick Unbanned %nick
inc %a
}
}
}

it will work properly

 Respond  
aaslyfox   -  Sep 29, 2005

Would putting this #: {
work instead of #:{ ?

 Respond  
timer   -  Sep 26, 2005

yes , like i said in the first post : restarted the client ofcourse :)
it just doesnt show the opped/voiced etc nick :/

 Respond  
RoninWarrior   -  Sep 26, 2005

i have done all of that supergeo still get errors this is what i get in your @window
Monitor Start Time: 10:02:34 09/26/2005

  • Logging @Monitor to \'logs\@Monitor.log\'
    xsplosive Joined #chitterchat.
    xsplosive Joined #mamma\'splace.
    ChanServ Opped in #Mamma\'sPlace.
    xsplosive Voiced in #Mamma\'sPlace.
    xsplosive De-Opped in #Mamma\'sPlace.
    and in the status window i get this about every 20 minuets are so and no it isnt a conflicting script either there is nothing else loaded in it .
  • :{ Unknown command

 Respond  
supergeo   -  Sep 25, 2005

You might have to restart the client to get it working again :\

 Respond  
supergeo   -  Sep 25, 2005

Oh, it doesn\'t include the person who was opped, etc? It should...

 Respond  
supergeo   -  Sep 25, 2005

\"(14:09:58) omgW Opped in #zero.
(14:09:59) vanISH Opped in #eu.
(14:10:41) c- Opped in #z-ya.
(14:10:41) Thab0mb Opped in #z-ya.
(14:22:35) 3rr0r Voiced in #qaz.
(14:38:49) desi Unbanned\"

What\'s the problem???

 Respond  
supergeo   -  Sep 25, 2005

\"I have noticed it uses on connect.What if you are already connected and then turn it on? I get errors such as above.\"

Yea, I noticed that. I\'ll fix it right now.

 Respond  
timer   -  Sep 25, 2005

(14:09:58) omgW Opped in #zero.
(14:09:59) vanISH Opped in #eu.
(14:10:41) c- Opped in #z-ya.
(14:10:41) Thab0mb Opped in #z-ya.
(14:22:35) 3rr0r Voiced in #qaz.
(14:38:49) desi Unbanned
is what i get , restarted the client ofcourse :)

 Respond  
RoninWarrior   -  Sep 24, 2005

-

:{ Unknown command

-
i have noticed it uses on connect what if you are already connected and then turn it on i do get errors suck as above.

 Respond  
TheHawk`   -  Sep 24, 2005

Very nice :) Good job

 Respond  
KuTsuM   -  Sep 24, 2005

I have something like this in my script, but it\'s docked to the bottom of the main window. Good job

 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.