This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

megglogger.tcl

Old posts that have not been replied to for several years.
Locked
S
Stone
Voice
Posts: 10
Joined: Mon Jul 25, 2005 5:02 am

megglogger.tcl

Post by Stone »

hello :)

Code: Select all

# logging binds
bind pubm - * log:chat
bind join - * log:join
bind part - * log:part
bind sign - * log:sign
bind topc - * log:topc
bind kick - * log:kick
bind nick - * log:nick
bind mode - * log:mode
bind ctcp - "ACTION" log:cact

# logging procs
proc log:chat {nick host hand chan text} {
  global logdir
  set logstr "\[[strftime %H:%M]\] <$nick> $text"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:join {nick host hand chan} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick ($host) has joined $chan"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:part {nick host hand chan} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick ($host) has left $chan ()"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:sign {nick host hand chan text} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick has left $chan ($text)"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:topc {nick host hand chan text} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick changes topic to '$text'"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:kick {nick host hand chan targ text} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $targ was kicked by $nick ($text)"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:nick {nick host hand chan newn} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick is now known as $newn"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:mode {nick host hand chan chag vict} {
  global logdir
  set logstr "\[[strftime %H:%M]\] *** $nick sets mode: $chag $vict"
  set addlog [open $logdir/[string range [string tolower $chan] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

proc log:cact {nick host hand dest keyw args} {
  global logdir
  if {[string range $dest 0 0] != "#"} {
    return 0
  }
  set logstr "\[[strftime %H:%M]\] * $nick $args"
  set addlog [open $logdir/[string range [string tolower $dest] 1 end].log a]
  puts $addlog "$logstr"
  close $addlog
}

# the end.
error ..

Code: Select all

Tcl error [log:part]: wrong # args: should be "log:part nick host hand chan"

any one can help me !!!
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

Code: Select all

proc log:part {nick host hand chan reason} {
S
Stone
Voice
Posts: 10
Joined: Mon Jul 25, 2005 5:02 am

Post by Stone »

thank you MeTroiD :)
S
Stone
Voice
Posts: 10
Joined: Mon Jul 25, 2005 5:02 am

Post by Stone »

what about this error ..

Code: Select all

[bs_timedsave]: error getting working directory name: permission denied

:? :?
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

That's from a different script. Either unload the one causing this or just check it's settings cos you don't seem to have access to read/write in that specific dir it wants to access.
Once the game is over, the king and the pawn go back in the same box.
S
Stone
Voice
Posts: 10
Joined: Mon Jul 25, 2005 5:02 am

Post by Stone »

thank you ..

i get error from bseen1.4.2 :? :? [/code]
Locked