Personal Seen Module

By PePpEr on May 30, 2009

well...it's my very first snippet, and its very usefull!!! hope u enjoy useing it :-) its a personal seen module... just hold alt and press R paste and it's yours. simply type /lastseen have fun

;Personal seen module v0.2
;Coded by PePpEr
;Email:PePpEriRC@Gmail.com

on *:load:{ 
  echo -a 5<<<Loaded>>> PeppEr's personal Seen module | echo -a  5Please type: /lastseen to launch the module.
  if ($exists(data\seen.txt) == $false) { mkdir data | write -c data\seen.txt }
  _vw msgrouter version  lastsee1.1
  _vw lastseen switch 1 
  _vw lastseen logquits 1 
  _vw lastseen logparts 1 
  _vw lastseen lognick 1 
  _vw lastseen logkicks 1 
}
;[read write data/setting.ini]
alias _vr {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  return $readini data\setting.ini $1 $2 
}
alias _vw {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  writeini data\setting.ini $1 $2 $3-
}
alias _vrem {
  if ($exists(data\setting.ini) == $false) { mkdir data | write -c data\setting.ini }
  remini data\setting.ini $1 $2 
}
alias lastseensw {
  if ($_vr(lastseen,switch) == 1) return (on)
  else return (off)
}
on *:TEXT:!seen*:#: {
  if ($_vr(lastseen,switch) == 1) {
    if (%ty >= 3) { 
      if ($me ison $chan) { .ignore -cu60 $nick | echo -a  0,4( ALERT ) $nick is Trigger Flooding. Ignore will be removed in 60 seconds. | .notice $nick You are ignored for Trigger Flooding. }
      if ($me isop $chan) { ban -u60 $chan $nick 3 | kick $chan $nick AUTO-KICK Trigger Flood  | notice $nick You have been banned for Trigger Flooding. The ban and Ignore will be revoked in 60 seconds.  }
      halt
    } 
    inc %ty
    .timer 1 20 unset %ty    
    :end
    if ($2 == $null) { .notice $nick You did not enter a nick to search. | halt }
    var %find  = $read -s $+ $2- data\seen.txt 
    if ($2 == $nick) { .notice $nick Looking for yourself, eh $nick $+ ? | halt }
    if ($2 == $me) { .notice $nick $nick $+ , I'm right here! | halt }
    if ($2 ison $chan) { .notice $nick $2 is here in $chan | halt }
    if (%find == $null) { .notice $nick $2 has not been seen by me. | halt }
    else { .notice $nick $2- $read -s $+ $2- data\seen.txt }
  }
}
on *:QUIT: if ($_vr(lastseen,logquits) == 1) { write -ds $+ $nick data\seen.txt | write data\seen.txt $nick - $address Quit at: $asctime(mmmm d yyyy  h:nn:sstt) Last Note: $chan Quit: $1- }
on *:PART:#: if ($_vr(lastseen,logparts) == 1) { write -ds $+ $nick data\seen.txt | write data\seen.txt $nick - $address Left at: $asctime(mmmm d yyyy  h:nn:sstt) Last Note: Left $chan }
on *:KICK:#: if ($_vr(lastseen,logkicks) == 1) { write -ds $+ $nick data\seen.txt | write data\seen.txt $knick - $address Kicked at: $asctime(mmmm d yyyy  h:nn:sstt) Last Note: Kicked from $chan $1- }
on *:NICK: if ($_vr(lastseen,lognick) == 1) { write -ds $+ $nick data\seen.txt | /write data\seen.txt $nick - $address Changed Nicks at: $asctime(mmmm d yyyy  h:nn:sstt) Last Note: *** $nick is now known as $newnick $+  } 
alias lastseen { 
  if ($dialog(lastseen) == $null) { dialog -m lastseen lastseen }
}
dialog lastseen {
  title "Seen module by PePpEr"
  option pixels 
  size -1 -1 170 250
  edit "", 4, 10 40 150 20,autohs, center 
  button "Clear Database", 11, 5 185 80 20, ok default
  button "Search", 17, 60 65 50 20, ok default
  button "Close", 12, 60 220 50 20, ok default
  text "Search Nick:", 13, 10 25 80 15
  check "Enable Public !seen", 15, 10 5 120 20
  button "Help", 16,120 24 40 15, hide
  text "", 18, 97 188 80 15
  box "", 19, 92 178 75 28
  check "Log Quits", 20, 15 95 80 20
  check "Log Parts", 21, 15 115 80 20
  check "Log Nick Changes", 22, 15 135 110 20
  check "Log Kicks", 23, 15 155 80 20
  box "", 24, 5 85 160 95
}
on *:dialog:lastseen:init:*:{ 
  if ($isalias(help-lastseen) == $true) did -v lastseen 16
  did -o lastseen 18 1 $file(data\seen.txt).size bytes
  if ($_vr(lastseen,switch) == 1) did -c lastseen 15 
  if ($_vr(lastseen,logquits) == 1) did -c lastseen 20 
  if ($_vr(lastseen,logparts) == 1) did -c lastseen 21 
  if ($_vr(lastseen,lognick) == 1) did -c lastseen 22 
  if ($_vr(lastseen,logkicks) == 1) did -c lastseen 23 

}
on *:dialog:lastseen:edit:*:{ 
}
on *:dialog:lastseen:sclick:*:{ 
  if ($did == 11) { write -c data\seen.txt | did -o lastseen 18 1 $file(data\seen.txt).size bytes | beep }
  if ($did == 17) { 
    if ($did(lastseen,4).text == $null) halt  
    var %find = $read -s $+ $did(lastseen,4).text data\seen.txt 
    if ($did(lastseen,4).text == $me) { echo -a LASTSEEN: $me $+ , umm look in the mirror | halt }
    if (%find == $null) { echo -a LASTSEEN: $did(lastseen,4).text has not been seen by me. | halt }
    else { echo -a LASTSEEN: $did(lastseen,4).text $read -s $+ $did(lastseen,4).text data\seen.txt }
    beep
  }
  if ($did == 15)  _vw lastseen switch $did($did).state 
  if ($did == 16) help-lastseen
  if ($did == 20)  _vw lastseen logquits $did($did).state 
  if ($did == 21)  _vw lastseen logparts $did($did).state 
  if ($did == 22)  _vw lastseen lognick $did($did).state 
  if ($did == 23)  _vw lastseen logkicks $did($did).state 
}

Comments

Sign in to comment.
Kent   -  Jun 02, 2010

theres no on*:JOIN:#: ??

 Respond  
PePpEr   -  Oct 01, 2009

k its fixed

 Respond  
PePpEr   -  Oct 01, 2009

oh yhea thanx ill fix it

 Respond  
Testor   -  May 31, 2009
    if (%ty => 3) { 

Should be:

     if (%ty >= 3) { 
 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.