!age Logger

By TophBeiFong on Jan 01, 2010

This is my Age Logger for Every room and server Enjoy

and i didn;t know how to use $did(sel,id) Sorry :(

on *:text:!age *:#OnlineGaming:{ 
  write C:\agechan.log $chan 
  write C:\agenick.log $nick 
  write C:\agelog.log - $+ $2 $+ -
  write C:\agehost.log $address($nick,2) 
}

dialog agelog {
  title "Age Logs"
  size -1 -1 300 200
  option dbu  
  text "     Channel                     Nickname            Age                      Users Host", 1, 1 4 199 9
  list 2, 2 12 42 175
  list 3, 50 12 42 175, disable
  list 4, 98 12 15 175, disable
  combo 5, 131 12 156 175
  button "Delete Logs", 6, 2 180 35 16
  button "Ban Users Host", 10, 180 180 42 16
}

on 1:dialog:agelog:sclick:*: {
  if ( $did == 6 ) { 
    Remove C:\agehost.log  
    remove C:\agenick.log  
    Remove C:\agechan.log  
    Remove C:\agelog.log
    dialog -x agelog agelog
    dialog -m agelog agelog
  }
  if ( $did == 10 ) { 
    mode $$?"Channel" +b $$?"User's Hostname"
  }
}

on *:DIALOG:agelog:*:*: {
  if ( $devent == init ) {
    var %a = 1
    while (%a <= $lines(C:\agenick.log)) {
      did -a agelog 3 $read(C:\agenick.log,%a)
      inc %a 1
    }
  }    
  if ( $devent == init ) {
    var %a = 1
    while (%a <= $lines(C:\agechan.log)) {
      did -a agelog 2 $read(C:\agechan.log,%a)
      inc %a 1
    }
  }    
  if ( $devent == init ) {
    var %a = 1
    while (%a <= $lines(C:\agelog.log)) {
      did -a agelog 4 $read(C:\agelog.log,%a)
      inc %a 1
    }
  }    
  if ( $devent == init ) {
    var %a = 1
    while (%a <= $lines(C:\agehost.log)) {
      did -a agelog 5 $read(C:\agehost.log,%a)
      inc %a 1
    }
  }    
}

alias agelog { dialog -m agelog agelog }

Comments

Sign in to comment.
[Plornt]   -  Jan 02, 2010

This is my Age Logger for Every room and server Enjoy

on :text:!age :#OnlineGaming:{

 Respond  
Aucun50   -  Jan 02, 2010
text "     Channel                     Nickname            Age                      Users Host", 1, 1 4 199 9

You could make the dialog smaller and use tabs.

 Respond  
FordLawnmower   -  Jan 01, 2010

I don't like the data being written to the root of C drive. Seems very senseless to me ;/

 Respond  
Jethro   -  Jan 01, 2010

Or !age 200
I can break the Gueness Word Record with that 3 digits...

 Respond  
sunslayer   -  Jan 01, 2010

!age yourmom
for example.

 Respond  
Jethro   -  Jan 01, 2010

What if people don't type their ages but some nonsense? Maybe you should use regex or isnum to make sure the $2 entered is a number.

 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.