#include "services.h"
#include "operserv.h"
#include "hash.h"
#include "email.h"
#include "log.h"
#include "sipc.h"
Go to the source code of this file.
Functions | |
void | saveKlineQueue () |
Keep the kline queue stored to disk before it's mailed. | |
void | loadKlineQueue () |
Loads the queued e-mail pieces to be sent to the AKILLMAILTO address. | |
void | listAkills (char *from, char type) |
Handles an AutoKill/AutoHurt/Ignore/... list request. | |
int | isAKilled (char *nick, char *user, char *host) |
Returns TRUE if a user is akilled. | |
akill * | getAkill (char *nick, char *user, char *host) |
long | getAkillId (struct akill *ak) |
akill * | getAhurt (char *nick, char *user, char *host) |
char * | getAkReason (struct akill *ak) |
char * | applyAkill (char *nick, char *user, char *host, struct akill *ak) |
int | isAHurt (char *nick, char *user, char *host) |
Returns TRUE if a user is autohurt. | |
int | isIgnored (char *nick, char *user, char *host) |
Returns TRUE if a user is ignored. | |
void | checkAkillAllUsers (struct akill *ak) |
Apply a new autokill/ban to online users. | |
int | addakill (long length, char *mask, char *by, char type, char *reason) |
Addakill adds an item to an OperServ autokill/ignore/autohurt/other list. | |
void | queueakill (char *mask, char *setby, char *length, char *reason, time_t time, int type, int id, int added) |
Adds information about an autokill to the body of the kline queue that is periodically mailed to the AKILLMAILTO address. | |
const char * | aktype_str (int type, int which) |
Returns a string indicating which type of OperServ banlist item we have. | |
void | timed_akill_queue (char *) |
Sends out services kline queue e-mail messages when the time arrives for them to be sent. | |
int | removeAkill (char *from, char *mask) |
Handles a user attempting to remove an akill. | |
int | removeAkillType (char *from, char *mask, int type, int restrict) |
Handles a user attempting to remove an OperServ banlist item. | |
void | autoremoveakill (char *mask) |
Handles automatic removal of expired akills by OperServ. | |
void | saveakills () |
Saves the akill database. | |
void | parseFprint (FILE *fp, char pre, const char *str) |
Splits a string across and prints each line starting with a prefix character. | |
void | loadakills () |
Load the akill/kline databases. | |
Variables | |
unsigned long | top_akill_stamp = 0 |
Highest akill stamp in use. | |
akill * | firstBanItem = NULL |
First Item in the autokill list. | |
EmailMessage | kline_email |
E-mail to be sent to kline@. | |
EmailString | kline_enforce_buf |
Buffer of akill enforcement logs. | |
EmailMessage | ops_email |
E-mail to be sent to ops@. | |
EmailString | ops_enforce_buf |
Enforce buffer to be mailed to ops. | |
int | kline_email_nitems = 0 |
Number of items in the kline queue for kline@. | |
int | ops_email_nitems = 0 |
Number of items in the kline queue for ops@. | |
time_t | kline_e_last_time |
Time of last kline@ kline queue message. | |
time_t | ops_e_last_time |
Time of last ops@ kline queue message. |
Procedures in this file are used by OperServ and services timers to manage the autokill lists - this module also contains the implementation of those lists.
Max Byrd
Greg Poma
James Hess
Definition in file akill.c.
|
Addakill adds an item to an OperServ autokill/ignore/autohurt/other list.
Definition at line 449 of file akill.c. References A_AHURT, A_AKILL, aktype_str(), autoremoveakill(), checkAkillAllUsers(), firstBanItem, mask(), myname, akill::next, oalloc(), OperServ, akill::prev, queueakill(), sSend(), strncpyzt, timer(), and top_akill_stamp. |
|
Returns a string indicating which type of OperServ banlist item we have.
Definition at line 577 of file akill.c. References A_AHURT, A_AKILL, and A_IGNORE. Referenced by addakill(), queueakill(), removeAkill(), and removeAkillType(). |
|
Definition at line 238 of file akill.c. References A_AHURT, A_AKILL, CTime, akill::host, akill::id, kline_email_nitems, kline_enforce_buf, myname, akill::nick, ops_email_nitems, ops_enforce_buf, akill::reason, akill::set, sSend(), akill::type, akill::unset, and akill::user. Referenced by addNewUser(). |
|
Handles automatic removal of expired akills by OperServ.
Definition at line 857 of file akill.c. References mask(), OperServ, and removeAkill(). Referenced by addakill(), and loadakills(). |
|
Apply a new autokill/ban to online users.
Definition at line 349 of file akill.c. References A_AHURT, A_AKILL, addGhost(), _userlist::caccess, CTime, delTimedGhost(), service_struct::host, _userlist::host, akill::host, kline_email_nitems, kline_enforce_buf, LIST_FIRST, LIST_NEXT, match(), service_struct::name, NBYPASS, _userlist::nick, akill::nick, NISOPER, _userlist::oflags, ops_email_nitems, ops_enforce_buf, akill::reason, _userlist::reg, remUser(), sSend(), strncpyzt, timer(), akill::type, _userlist::user, akill::user, and UserHash. Referenced by addakill(). |
|
Returns TRUE if a user is autohurt.
Definition at line 303 of file akill.c. References A_AHURT, firstBanItem, match(), and akill::next. Referenced by parseLine(). |
|
Returns TRUE if a user is akilled.
Definition at line 179 of file akill.c. References A_AKILL, firstBanItem, match(), and akill::next. Referenced by changeNick(). |
|
Returns TRUE if a user is ignored.
Definition at line 327 of file akill.c. References A_IGNORE, firstBanItem, match(), and akill::next. Referenced by parseLine(). |
|
Handles an AutoKill/AutoHurt/Ignore/... list request.
Definition at line 129 of file akill.c. References firstBanItem, mask(), akill::next, OperServ, and sSend(). |
|
Loads the queued e-mail pieces to be sent to the AKILLMAILTO address.
Definition at line 902 of file akill.c. References EmailString::add(), kline_e_last_time, kline_email, kline_email_nitems, kline_enforce_buf, ops_e_last_time, ops_email, ops_email_nitems, and ops_enforce_buf. Referenced by loadakills(). |
|
Splits a string across
Definition at line 976 of file akill.c. References strncpyzt. Referenced by saveKlineQueue(). |
|
Adds information about an autokill to the body of the kline queue that is periodically mailed to the AKILLMAILTO address.
Definition at line 536 of file akill.c. References EmailString::add(), aktype_str(), EmailMessage::body, kline_email, kline_email_nitems, mask(), ops_email, and ops_email_nitems. Referenced by addakill(), removeAkill(), and removeAkillType(). |
|
Handles a user attempting to remove an akill.
Definition at line 682 of file akill.c. References A_AHURT, A_AKILL, aktype_str(), cancel_timer(), firstBanItem, getNickData(), mask(), myname, akill::next, OAKILL, OperServ, opFlagged(), queueakill(), and sSend(). Referenced by autoremoveakill(). |
|
Handles a user attempting to remove an OperServ banlist item.
Definition at line 771 of file akill.c. References A_AHURT, A_AKILL, aktype_str(), cancel_timer(), firstBanItem, getNickData(), mask(), myname, akill::next, OAKILL, OperServ, opFlagged(), queueakill(), and sSend(). |
|
Saves the akill database.
Definition at line 867 of file akill.c. References firstBanItem, akill::next, and saveKlineQueue(). Referenced by sshutdown(). |
|
Highest akill stamp in use.
Definition at line 69 of file akill.c. Referenced by addakill(), loadakills(), main(), and writeServicesTotals(). |