2004-10-14 22:20:03 +00:00
|
|
|
#!/usr/bin/perl
|
|
|
|
|
|
|
|
use constant {
|
|
|
|
DB_TYPE => "mysql", # dbi database type (only MySQL is
|
|
|
|
# supported currently, due to the
|
|
|
|
# fact that "LIMIT X,X" is used
|
|
|
|
|
|
|
|
DB_NAME => "kwotes", # database name
|
|
|
|
|
2004-10-15 07:47:54 +00:00
|
|
|
DB_HOST => "127.0.0.1", # database host
|
2004-10-14 22:20:03 +00:00
|
|
|
|
|
|
|
DB_USER => "kwotes", # database user
|
|
|
|
|
|
|
|
DB_PASS => "kw0tes", # database password
|
|
|
|
|
|
|
|
SECS_BETWEEN_KWOTES => 60*60, # seconds a user must wait after
|
|
|
|
# submitting MAX_KWOTES_PER_IP
|
|
|
|
# kwotes to the system before they
|
|
|
|
# are allowed to submit another
|
|
|
|
# kwote
|
2004-10-15 07:47:54 +00:00
|
|
|
|
|
|
|
KWOTE_DEATH_RATING => -1, # lowest rating a quote can be
|
|
|
|
# before it's deleted. A kwote is
|
|
|
|
# only deleted if it's been this
|
|
|
|
# number (or lower) for longer than
|
|
|
|
# the KWOTE_TTL
|
2004-10-14 22:20:03 +00:00
|
|
|
|
2004-10-15 07:47:54 +00:00
|
|
|
KWOTE_TTL => (60*60)*24, # seconds before a "dead"
|
2004-10-14 22:20:03 +00:00
|
|
|
# quote is moved to the kwote
|
|
|
|
# backup table and deleted
|
|
|
|
|
2004-10-15 07:47:54 +00:00
|
|
|
VOTE_TTL => (60*60)*24, # seconds a vote log lasts, the vote
|
2004-10-14 22:20:03 +00:00
|
|
|
# log is the mechanism that keeps
|
|
|
|
# people from voting over and over
|
2004-10-15 07:47:54 +00:00
|
|
|
|
|
|
|
MAX_VOTES_PER_IP => 4, # maximum votes per ip address per
|
|
|
|
# VOTE_TTL seconds.
|
|
|
|
|
|
|
|
MAX_KWOTES_PER_IP => 5 # maximum kwotes allowed per ip
|
|
|
|
# in SECS_BETWEEN_KWOTES
|
|
|
|
|
2004-10-14 22:20:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
1;
|
|
|
|
|