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.

logging "quits"

Old posts that have not been replied to for several years.
Locked
t
toby
Voice
Posts: 17
Joined: Mon Nov 26, 2001 8:00 pm
Location: norway
Contact:

Post by toby »

Is there a script for eggdrop that loggs "quits"?
toby_
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

Code: Select all

set logfilename "logs/kangaroos.log"

bind sign - * log_signoffs

proc log_signoffs {nick uhost hand chan text} {
  global logfilename
  set fp [open $logfilename a]
  puts $fp "$nick!$uhost quit from $chan ($text)"
  close $fp
}
t
toby
Voice
Posts: 17
Joined: Mon Nov 26, 2001 8:00 pm
Location: norway
Contact:

Post by toby »

thx.
I´m not a scripter but managed to paste the code in an tcl-file and load it to the bot as a tcl-script.
Now the bot loggs quits. It was fun.

Now, I want the bot to make a webpage , using the quit-log.If its not to much troubble,can you write that code?
toby_
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

I have no idea what quit-log.If is, sorry.

But basically to make a webpage, just change the "puts" line to have html code.

puts $fp "<div class='nick'>$nick!$uhost</div><div class='channel'>has quit $chan</div><div class='quitmsg'>$text</div>"

Then define the css classes in your html file, put a header like <h1>Today's Quit Messages</h1> and you're set.
t
toby
Voice
Posts: 17
Joined: Mon Nov 26, 2001 8:00 pm
Location: norway
Contact:

Post by toby »

hey stdragon.
The code you made is now logging quits on my channels.The bot creates i .txt file called quit.txt.We have managed to make a website were the bot adds, quits automatic.
http://www.spanky.no/spanky/index.php?p=20021005
Can u make the code so that:
1. no user is logged twice , unless he has a new quit
2.Set the channels to log.

toby_
Locked