Skip to content
MSN

Knock Log

A TG007 community discussion started by MucH.

Discussion 9 posts
Page 1 of 1
Open
Topic #700 · 9 published posts · 792 views

help.gif If been gone for a lil while and seems if lost touch of some coding and looking for a lil help for a knock to open a window and log the time, nick, and gate and reason. This is what I have so far, but I can assure you its not working. help.gif

raw knock:*: {
 if ($window(@knocks) == $null) {
   window -efk0 @knocks  -1 -1 800 200
 }
 echo @knocks 1 At $asctime(hh:nn:ss) $msn.decode $nick $+ $address($nick,1) Knocked: Can't join because he/she 03(02Banned03) 
}

P.S. the emoticon with LOL! sign and the emoticon on the first row, third one down has the same ID : lol:, spaced so the emoticon wouldnt appear again, didnt know if anyone else realized that huh.gif

Try this. Taken from Vincula but modified for your purpose.

on *:START:{
 window @knock
}
raw KNOCK:*: { 
 if ($2 == 913) echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Access Ban): $nick
 elseif ($2 == 471) echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Room is full): $nick
 elseif ($2 == 473) echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Room is invite only): $nick
 elseif ($2 == 474) echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Banned): $nick
 elseif ($2 == 475) echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Need room key): $nick
 else echo @knock * Knock:  $asctime $msn.ifdecode($nick) ( $+ $address $+ ) (Numeric: $2 $+ ): $nick
 haltdef
}

 

jump.gif

Edited Jun 25, 2004 2:45 AM by Mail

 

"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers

menu * {
-
Knock Logger
.Turn On Knock Logger:.enable #logknock
.Turn Off Knock Logger:.disable #logknock
.-
.View Log File:run knocklog.dat
#logknock on
raw KNOCK:*: { 
write knocklog.dat [ $+ $date $+ ][ $+ $asctime $+ ] Knock $2 = $msn.decode($nick) = $address = $replace($2,913,access ban,471,room full,473,room is invite only,474,banned,475,room key needed)
haltdef
}
#logknock end

 

 

This is the same thing as the one above, except it has the ability to be turned off/on, and writes it to a text file so that you can keep a good track of all knocks.

Edited Jun 25, 2004 1:12 PM by The Gate Keeper

Thanks Mail & GateKeeper for your replies...

woot_jump.gif

 

Edit: * /run: unable to open 'knocklog.dat'

Edited Jun 26, 2004 2:33 AM by MucH

If you want to enable logging on the one i posted right click on the knock window and click logging. whistle.gif

 

"Diplomacy is the art of saying 'Nice doggie' until you can find a rock".-Will Rogers

from memory, log file doesn't work till 1 log event gets put into it first.

GateKeeper the problem is that it named the knock.dat file as knocklog.dat$date][$asctimeKnock That might be part of the problem in which it wouldnt open blink.gif

write $+(",Remote\,knock.dat") $2 $1

Might be the solution i've been looking for.

 

Edit: Nope not working either thumbdown.gif

Edited Jun 26, 2004 7:45 PM by MucH

lol i made an event logger and it does that for me too, creates stupid file names and i couldnt figure out why. It hasn't effected the script in anyway so i wouldnt worry about it

"Be more concerned with your character than your reputation

because your character is who you really are while your reputation is merely what others think of you."

 

DesolateMx 8.0

Try this code.

 

menu * {
-
Knock Logger
.Turn On Knock Logger:{ if (!$exists($findfile($mircdir,knocklog.dat,1))) { write knocklog.dat <Knocks Logged Here> | enable #logknock }
}
.Turn Off Knock Logger:.disable #logknock
.-
.View Log File {  run knocklog.dat }
#logknock on
raw KNOCK:*: {
write knocklog.dat $chr(32) $+ [ $+ $date $+ ] $chr(32) $+ [ $+ $asctime $+ ] $chr(32) $+  Knock $2 = $msn.decode($nick) = $address = $replace($2,913,access ban,471,room full,473,room is invite only,474,banned,475,room key needed)
haltdef
}
#logknock end

 

This way if the file "knocklog.dat" doesn't exist it will create it.

Edited Jun 27, 2004 3:42 PM by Warrior124