Link Logging script for Eggdrop
A simple script for an eggdrop bot that will monitor a specified channel for URLs then log them with a time stamp against a username. I'm not a professional coder and I did this mainly to learn some more about TCL which I can use in EEM scripts on Cisco boxes :) I'm open to suggestions but please be gentle. I've tried as much as possible to make the code very readable and easy to debug when needed (set debug = 1).
At the moment V1.1 the main functions are:
- Log all links in a channel against specific username
- Spam last 3 links of a user
- Spam a count of links of a user
- Display the top 3 link spammers in the channel with their associated counts
- Ignore specific users E.g. other bots
Example of linklogger in action
Snippet of the code:
###################
# Check file exsists
###################
proc linkfilecheck {FILENAME} {
global linklog
if {$linklog(debug) == 1} {
putlog "$linklog(debugstring) Linkfilecheck called with arg $FILENAME"
}
# checking the file exists
if [file exists $FILENAME] then {
# file exists
return 1
} else {
# file not exists
return "0"
}
}
putlog "link logger v 1.1 by m00nie http://www.m00nie.com"
Grab the file [here], edit it to your needs, then just add source scripts/linklogger.tcl
to your eggdrop config file and reload the bot
m00nie :)