Cheiron`s Ban / Kick logging

By Cheiron on Nov 16, 2007

This is a ban and kick logger that utilises seperate windows to show kicks and bans.
very useful if you are in high volume rooms with ops and have alot of kicks and bans.. if you go afk for extended time and come back .. you only need look in say @bans window to see what has happened when and then got to exact time on logs.

this loads up in a fresh new remotes window on your mirc. this was tested on mirc v6.35

when a @bans or @kicks window opens .. click it to view, then right click the tab itself .. @bans or @kicks then goto logging and turn on

then name the file and where it is to log.. and that is it done then :)
Image
Image
Image

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Cheiron's Kick and Ban logging system ;
; utilising 2 seperate custom windows   ;
; for ease of viewing and log finding   ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;       
;first the event which in this case is an on ban
on *:ban:#:{
;open a new window on mirc. we will call it @bans
 window @bans
;now to write the information in that window for easy later viewing using echo 
 echo -t @bans [ban logger] $nick set the following ban $1- against user $bnick on $time $date in $chan
;close the brackets at the end
} 
;same here but this is the kick event
on *:kick:#:{ 
 window @kicks
 echo -t @kicks [kick tracker] $nick kicked $knick from $chan on $date at $time 
}

Comments

Sign in to comment.
Jethro   -  May 23, 2011

I like simplicity, but simplicity isn't always revolved around a successful accomplishment due to the limitation of a mIRC identifier or a command. Thus we need to find another way or path to compensate that fallacy. Once you get the hing of a subject, it won't be as complicated as you think. In fact, you will see it as easy as pie.

 Respond  
Cheiron   -  May 23, 2011

thankies and thats got it.
shame the code has had to evolve so complex though compared to the simplicity i originally did.

just goes to show that using basics and mirc doesnt always work out

 Respond  
Jethro   -  May 23, 2011

You know what. We don't need the rawmode event after all:

on *:ban:#: bklog $1-
on *:kick:#: bklog
alias -l bklog {
  window $iif($event == kick,@kicks,@bans)
  if ($event == kick) {
    echo -t @kicks [kick tracker] $nick kicked $knick from $chan on $date at $time
  }
  else {
    var %b = 1
    while ($ialchan($banmask,$chan,%b).nick) {
      echo -t @bans [ban logger] $nick set the following ban $1- against the user $v1 on $time $date in $chan
      inc %b
    }
  }
}

It was as simple as adding the $1- after the event parameter.

 Respond  
Jethro   -  May 23, 2011

lol My mistake. I left it out thinking that was unimportant. Here is the fix:

on *:ban:#: bklog
on *:kick:#: bklog
on *:rawmode:#:if ($regex($1-,/([+][^\-]*b.+)/)) set %bset $regml(1)
alias -l bklog {
  window $iif($event == kick,@kicks,@bans)
  if ($event == kick) { 
    echo -t @kicks [kick tracker] $nick kicked $knick from $chan on $date at $time 
  }
  else {
    var %b = 1
    while ($ialchan($banmask,$chan,%b).nick) {
      echo -t @bans [ban logger] $nick set the following ban %bset against the user $v1 on $time $date in $chan
      inc %b
    }
    unset %bset
  }
}
 Respond  
Cheiron   -  May 23, 2011

initially .. the bot was showing with my code ..

[ban logger] Cheiron set the following ban +b Titan_Bot!@* against user on 19:10:05 23/05/2011 in #test

with your edit ..

[ban logger] Cheiron set the following ban against the user Titan_Bot on 21:12:58 23/05/2011 in #test

mine is missing the nick but has the ban ... yours has the nick but is missing the ban

 Respond  
Jethro   -  May 23, 2011

What do you mean by ban set?

 Respond  
Cheiron   -  May 23, 2011

ok.. we have done from one extreme to another lol

yes it now shows the nick

[ban logger] Cheiron set the following ban against the user Titan_Bot on 21:07:56 23/05/2011 in #AmRadio
BUT ..... it now no longer SHOWS the ban set

 Respond  
Jethro   -  May 23, 2011

Cheiron, use

$ial($banmask,$chan,0).nick

in conjunction with a while loop. This will always return the correct banned nickname if a ban mask doesn't contain the nickname. This is my approach toward what your code should have been become of:

on *:ban:#: bklog
on *:kick:#: bklog
alias -l bklog {
  window $iif($event == kick,@kicks,@bans)
  if ($event == kick) {
    echo -t @kicks [kick tracker] $nick kicked $knick from $chan on $date at $time
  }
  else {
    var %b = 1
    while ($ialchan($banmask,$chan,%b).nick) {
      echo -t @bans [ban logger] $nick set the following ban against the user $v1 on $time $date in $chan
      inc %b
    }
  }
}
 Respond  
Cheiron   -  May 23, 2011

which it does and for the life of me. i havent been able to find a replacement identifier to keep the code as basic as it is..
best i have been able to do is $2 which merely returns the ban mask shown by $1-

any ideas ???

 Respond  
Jethro   -  Mar 18, 2011

I see there is a $bnick in the code. It may return $null if the ban itself doesn't include the banned nickname.

 Respond  
jaytea   -  Mar 17, 2011

Why did you use echo?

he's using /echo -t; /aline doesn't have a -t switch. there are also a couple of side effects of using /echo that are desirable in a script such as this: the window label changes to the 'event' colour indicating to the user that information has been added, and the line can potentially be logged to a file if the user chooses to log the window. just because /aline can only be used with a custom window does not mean a custom @window should only ever use /aline.

That way, it actually takes less CPU.

this is baseless nonsense.

 Respond  
Merbo   -  Mar 17, 2011

I'm surprised I haven't even posted a script...
But all of my scripts are for server admins, most of the scripts I've found were for fooling around, having channelmode +o at most.
I just noticed you were a server owner :o
I own irc.merbosmagic.co.cc

 Respond  
Cheiron   -  Mar 17, 2011

i wanted it simple at the end of the day as less to go wrong.
i had looked at using aline but in a different manner as per the excerpt below.

window -nek @kicks
aline -hp 0 @kicks $1- at $time on $date
haltdef

 Respond  
Merbo   -  Mar 17, 2011

Why did you use echo?

 echo -t @kicks [kick tracker] $nick kicked $knick from $chan on $date at $time 
 echo -t @bans [ban logger] $nick set the following ban $1- against user $bnick on $time $date in $chan

You should use aline, as well as use $& to simplify the code:

aline @kicks [kick tracker] $nick kicked $knick $&
 from $chan on $date at $time 
aline @bans [ban logger] $nick set the following $&
 ban $1- against user $bnick on $time $date in $chan

That way, it actually takes less CPU.

 Respond  
PuNkS   -  Dec 29, 2009

nice wOrk..
i like it..
7/10
phew..

 Respond  
Cheiron   -  Jul 04, 2009

updates . logging for mirc users explained in the introduction
updates . added screenshots to show the script in use

 Respond  
Cheiron   -  Jul 03, 2009

updated .. script now utilises seperate windows from the original self pm method.

updated .. seperate windows for kick and ban to avoid confusion when checking

updated .. made code easier to understand for newcomers to scripting with subnotes embedded

to do list - need help to get the @windows to log so can retrieve from logs using this format writeini -n logbans.txt / writeini -n logkicks.txt

thanks for the tips folks and look forward to the new reviews

 Respond  
Abtehi   -  Aug 20, 2008

Thank you, great job :)

 Respond  
Cheiron   -  Aug 18, 2008

it will trigger no matter what channel you are in from whoever kicks or bans Abtehi. there is no fixed channel included. as i have logging enable on mirc, it will log every room that i am in, every kick and ban, who did it, in what room, etc

 Respond  
Abtehi   -  Aug 17, 2008

cheiron,

shouldnt you make it globally on notice instead of missing it from one channel to another...?

 Respond  
Cheiron   -  Nov 19, 2007

ty SpotRedDog. the script runs nice and stable from mIRC6.16 to the new mIRC6.31. i been using it for ages and have had no issues. only thing to watch with it, is if you have a pm blocker as theoritically you are receiving a pm from your own script and ergo the pm blocker will stop it. just remember to add your own nick to the pm bypass to allow it to run if this is the case.
Cheiron

 Respond  
SpotRedDog   -  Nov 19, 2007

Its a nice small code very good looking!!! I will give it a try later on today and then rate it if it works as good as it looks you are well on your way to scripting with ease.

Nice Job and Keep It Up!!!

 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.