Top

Seen script.


mIRC Code
+ 1 likes
Please Register to submit score.
Bookmark and Share
Average Score  5.0 (of 4 scores)
Date Added  Oct 11, 2009
Last Updated  Oct 11, 2009
Tags  file  have  ini  it  read  readini  seen  writeini  yet  you 

Introduction

My seen script, im very proud of the fact i added my $fulldate with out the ending which would just annoy me :| anyways, heres the script :). Type !seen < person > if you seen them, the script has to.

Grab the Code

on *:TEXT:!seen*:#: {
  .timerfloods 1 10 unset %s
  if ( %s >= 3 ) { halt }
  inc %s 1
  if ( $2 ison $chan ) {
    msg $chan $2 is currently in the channel
    halt
  }
  if ($readini(seen.ini, $2, time)) {
    msg $chan I last saw 12{14- $2 14-12} $iif($readini(seen.ini, $2, channel),in) $readini(seen.ini, $2, channel) 12{14- $readini(seen.ini, $2, action) 14-12} 12{14- $readini(seen.ini, $2, saying) 14-12} on 12{14- $Readini(seen.ini, $2, date) 14-12} at 12{14- $readini(seen.ini, $2, time) 14-12}
    halt
  }
  if (guest* iswm $2) { msg $chan I do not keep track of guests, there are to many and to few logs. | halt }
  msg $chan I have no logs of $2 $+ , sorry.
}
on *:TEXT:*:#: { 
  if (guest* iswm $nick) { halt }
  writeini -n seen.ini $nick channel $chan
  writeini -n seen.ini $nick action saying
  writeini -n seen.ini $nick saying $1-
  writeini -n seen.ini $nick time $time
  writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
}
 
on *:KICK:*: { 
  if (guest* iswm $nick) { halt }
  writeini -n seen.ini $nick channel $chan
  writeini -n seen.ini $nick action kicking
  writeini -n seen.ini $nick saying $knick
  writeini -n seen.ini $nick time $time
  writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  writeini -n seen.ini $knick channel $chan
  writeini -n seen.ini $knick action being kicked
  writeini -n seen.ini $knick time $time
  writeini -n seen.ini $knick saying by $nick with reason $1-
  writeini -n seen.ini $knick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
}
 
 
on *:PART:#: { 
  if ($nick != $me) { 
    if (guest* iswm $nick) { halt }
    writeini -n seen.ini $nick channel $chan
    writeini -n seen.ini $nick action leaving
    writeini -n seen.ini $nick time $time
    writeini -n seen.ini $nick saying with reason $iif(!$1,no reason,$1-)
    writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  }
}
 
on *:JOIN:#: { 
  if ($nick != $me) { 
    if (guest* iswm $nick) { halt }
    writeini -n seen.ini $nick channel $chan
    writeini -n seen.ini $nick action joining
    writeini -n seen.ini $nick time $time
    writeini -n seen.ini $nick saying nothing obviously.
    writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  }
}
 
on *:QUIT: { 
  if ($nick != $me) { 
    if (guest* iswm $nick) { halt }
    writeini -n seen.ini $nick action quiting
    writeini -n seen.ini $nick time $time
    writeini -n seen.ini $nick saying with reason $1-
    writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  }
}
 
on *:ACTION:#: { 
  if ($nick != $me) { 
    if (guest* iswm $nick) { halt }
    writeini -n seen.ini $nick channel $chan
    writeini -n seen.ini $nick action actioning
    writeini -n seen.ini $nick time $time
    writeini -n seen.ini $nick saying $1-
    writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  }
}
 
on *:NICK: { 
  if ($newnick != $me) {  
    if (guest* iswm $nick) { halt }
    writeini -n seen.ini $nick action changing their nick to
    writeini -n seen.ini $nick saying $newnick
    writeini -n seen.ini $nick time $time
    writeini -n seen.ini $nick date $remove($fulldate,$right($fulldate,14)) $right($date,4)
  }
}

Comments

  (10)  RSS
sunslayer
Comments: 266
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 8:14 am
maybe add so it will track the host too?
also
Quote:
im very proud of the fact i added my $fulldate with out the ending which would just annoy me :|
Code:
$time(ddd mmm d)
:p
Atr
Comments: 60
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 9:22 am
Lol @ not tracking Guests..
Jethro_
Comments: 436
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 10:10 am
Quote:
if ( uest isin $nick ) { halt }
can be coded as:
Code:
if ($nick != uest) {


Quote:
on *:PART:#: {
if ($nick != $me) {

on *:JOIN:#: {
if ($nick != $me) {

on *:QUIT: {
if ($nick != $me) {

on *:ACTION:#: {
if ($nick != $me) {


can be coded as:
Code:

on !*:PART:#: {
on !*:JOIN:#: {
on !*:QUIT: {
on !*:ACTION:#: {


p.s. for your on nick event...if I'm correct, is supposed to trigger when a user changes nickname. If that's the case, your $nick != $me will never be true.
Ghost-writer
Comments: 255
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 10:29 am
Code:

if ($nick != uest) {


That wouldnt work, that will only take place if $nick == uest, i want if guest isin the nick or guest9823498 isin the nick, it doesnt track, not just 1 nick.

and i dont see ho that list of things will work, all on events in 1. thats a first for me.
Jethro_
Comments: 436
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 10:33 am
Oh, I mistook that as a nickname. Then you can use
Code:
if (guest* !iswm $nick)
Jethro_
Comments: 436
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 10:37 am
The use of isin operator is not safe, because if nicks have "uest" in them, they'll be negated, hence your use of /halt
Ghost-writer
Comments: 255
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 10:44 am
Thanks jethro_, thats nice :P. i updated script. tyvm :D.
FordLawnmower
Comments: 411
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 12:24 pm
Using ini's for a script like this is impractical.
For a script that is constantly writing data you must use hashtables if you want to make an efficient script. Writeini was not made to be used this way. This is why the -n was added as an afterthought to override the 64k limit.
Also, if someone is using the script at the same time that someone gets kicked, the .ini is likely to get corrupted.
Not to mention the fact that your script will be to busy writing files during kicks that it won't be able to respond in a timely manner to the current event.
If you used hashtables you would just write one entry with all the information.
Testor
Comments: 81
 
mIRC Snippet:  Seen script.
Posted on Oct 11, 2009 3:27 pm
make a skip-over for unknown, like you have with guest. as the same principal occurs.
knoeki
Comments: 120
 
mIRC Snippet:  Seen script.
Posted on Oct 12, 2009 8:27 am
As fordlawnmower said, hashtables are much better suited for this job. Just use a timer or so to ocassionally store the hashtable to a file, in case of a sudden crash, and load the file back in the hashtable in an on START event or so.

Also, instead of checking if the nick IS a guest nick and halting, why not check if the nick ISNT a guest, and then write to a file, else do nothing. saves a bit code and looks somewhat more neat, imho.

I might post my own seen script in a while, when it's completely done. :_)

Commenting Options

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

  
Bottom