#include "services.h"
#include "pseudo.h"
Go to the source code of this file.
Defines | |
| #define | SAFE(x) |
| #define | SAFE(x) |
Functions | |
| void | bot_join (ChannelInfo *ci) |
| void | bot_raw_ban (User *requester, ChannelInfo *ci, char *nick, char *reason) |
| void | bot_raw_kick (User *requester, ChannelInfo *ci, char *nick, char *reason) |
| void | bot_raw_mode (User *requester, ChannelInfo *ci, char *mode, char *nick) |
| void | bot_rejoin_all (BotInfo *bi) |
| void | botchanmsgs (User *u, ChannelInfo *ci, char *buf) |
| void | botmsgs (User *u, BotInfo *bi, char *buf) |
| void | botserv (User *u, char *buf) |
| void | bs_init (void) |
| BotInfo * | findbot (char *nick) |
| void | get_botserv_stats (long *nrec, long *memuse) |
| void | insert_bot (BotInfo *bi) |
| void | load_bs_dbase (void) |
| BotInfo * | makebot (char *nick) |
| E void | moduleAddBotServCmds (void) |
| char * | normalizeBuffer (char *buf) |
| void | save_bs_dbase (void) |
| void | save_bs_rdb_dbase (void) |
| void | unassign (User *u, ChannelInfo *ci) |
Variables | |
| BotInfo * | botlists [256] |
| int | nbots = 0 |
| #define SAFE | ( | x | ) |
Value:
do { \ if ((x) < 0) { \ restore_db(f); \ log_perror("Write error on %s", BotDBName); \ if (time(NULL) - lastwarn > WarningTimeout) { \ anope_cmd_global(NULL, "Write error on %s: %s", BotDBName, \ strerror(errno)); \ lastwarn = time(NULL); \ } \ return; \ } \ } while (0)
| #define SAFE | ( | x | ) |
Value:
do { \ if ((x) < 0) { \ if (!forceload) \ fatal("Read error on %s", BotDBName); \ failed = 1; \ break; \ } \ } while (0)
Definition at line 485 of file botserv.c.
Referenced by load_bs_dbase(), load_cs_dbase(), load_exceptions(), load_hs_dbase_v1(), load_hs_dbase_v2(), load_hs_dbase_v3(), load_news(), load_ns_dbase(), load_ns_req_db(), load_old_ns_dbase(), load_os_dbase(), main(), save_bs_dbase(), save_cs_dbase(), save_exceptions(), save_hs_dbase(), save_news(), save_ns_dbase(), save_ns_req_dbase(), and save_os_dbase().
| void bot_join | ( | ChannelInfo * | ci | ) |
Definition at line 752 of file botserv.c.
References anope_cmd_mode(), anope_cmd_notice_ops(), anope_get_invite_mode(), channel_::bancount, channel_::bans, chaninfo_::bi, BSSmartJoin, BUFSIZE, chaninfo_::c, do_cmode(), botinfo_::host, channel_::limit, match_wild_nocase(), channel_::mode, chaninfo_::name, channel_::name, botinfo_::nick, scalloc(), snprintf(), sstrdup(), botinfo_::user, and channel_::usercount.
Referenced by bot_rejoin_all(), chan_adduser2(), do_assign(), do_kick(), and do_sjoin().
| void bot_raw_ban | ( | User * | requester, | |
| ChannelInfo * | ci, | |||
| char * | nick, | |||
| char * | reason | |||
| ) |
Definition at line 878 of file botserv.c.
References anope_cmd_kick(), anope_cmd_mode(), anope_cmd_privmsg(), chaninfo_::bi, BUFSIZE, CA_SIGNKICK, check_access(), CI_PEACE, CI_SIGNKICK, CI_SIGNKICK_LEVEL, do_cmode(), do_kick(), ircdvars_::except, finduser(), chaninfo_::flags, get_access(), get_idealban(), getstring2, ircd, ircdcap, is_excepted(), is_protected(), chaninfo_::name, user_::nick, botinfo_::nick, ircdvars_::protectedumode, snprintf(), sstrdup(), stricmp(), and ircdcapab_::tsmode.
| void bot_raw_kick | ( | User * | requester, | |
| ChannelInfo * | ci, | |||
| char * | nick, | |||
| char * | reason | |||
| ) |
Definition at line 962 of file botserv.c.
References anope_cmd_kick(), anope_cmd_privmsg(), chaninfo_::bi, chaninfo_::c, CA_SIGNKICK, check_access(), CI_PEACE, CI_SIGNKICK, CI_SIGNKICK_LEVEL, do_kick(), finduser(), chaninfo_::flags, get_access(), getstring2, ircd, is_on_chan(), is_protected(), chaninfo_::name, user_::nick, botinfo_::nick, ircdvars_::protectedumode, and stricmp().
| void bot_raw_mode | ( | User * | requester, | |
| ChannelInfo * | ci, | |||
| char * | mode, | |||
| char * | nick | |||
| ) |
Definition at line 1008 of file botserv.c.
References anope_cmd_mode(), anope_cmd_privmsg(), chaninfo_::bi, BUFSIZE, chaninfo_::c, CI_PEACE, do_cmode(), finduser(), chaninfo_::flags, get_access(), getstring2, ircd, ircdcap, is_on_chan(), is_protected(), chaninfo_::name, user_::nick, botinfo_::nick, ircdvars_::protectedumode, snprintf(), stricmp(), and ircdcapab_::tsmode.
Referenced by do_fantasy().
| void bot_rejoin_all | ( | BotInfo * | bi | ) |
Definition at line 804 of file botserv.c.
References chaninfo_::bi, bot_join(), BSMinUsers, chaninfo_::c, chanlists, chaninfo_::next, and channel_::usercount.
| void botchanmsgs | ( | User * | u, | |
| ChannelInfo * | ci, | |||
| char * | buf | |||
| ) |
Definition at line 131 of file botserv.c.
References anope_cmd_ctcp(), chaninfo_::badwords, chaninfo_::bi, chaninfo_::botflags, BS_DONTKICKOPS, BS_DONTKICKVOICES, BS_FANTASY, BS_KICK_BADWORDS, BS_KICK_BOLDS, BS_KICK_CAPS, BS_KICK_COLORS, BS_KICK_FLOOD, BS_KICK_REPEAT, BS_KICK_REVERSES, BS_KICK_UNDERLINES, BSCaseSensitive, BSFantasyCharacter, BSGentleBWReason, BW_ANY, BW_END, BW_SINGLE, BW_START, chaninfo_::c, CA_FANTASIA, CA_NOKICK, chaninfo_::capsmin, chaninfo_::capspercent, chan_get_user_status(), check_access(), CUS_HALFOP, CUS_OP, CUS_OWNER, CUS_PROTECT, CUS_VOICE, EVENT_BOT_FANTASY, EVENT_BOT_FANTASY_NO_ACCESS, chaninfo_::floodlines, chaninfo_::floodsecs, get_ignore(), badword_::in_use, userdata_::last_start, userdata_::lastline, userdata_::lines, chaninfo_::name, user_::nick, botinfo_::nick, normalizeBuffer(), chaninfo_::repeattimes, scalloc(), send_event(), sstrdup(), stricmp(), stristr(), strnicmp(), userdata_::times, TTB_BADWORDS, TTB_BOLDS, TTB_CAPS, TTB_COLORS, TTB_FLOOD, TTB_REPEAT, TTB_REVERSES, TTB_UNDERLINES, badword_::type, and badword_::word.
Referenced by m_privmsg().
Definition at line 108 of file botserv.c.
References anope_cmd_ctcp(), user_::nick, botinfo_::nick, and stricmp().
Referenced by m_privmsg().
| void botserv | ( | User * | u, | |
| char * | buf | |||
| ) |
Definition at line 83 of file botserv.c.
References anope_cmd_ctcp(), BOTSERV, mod_run_cmd(), user_::nick, notice_lang(), s_BotServ, skeleton, and stricmp().
Referenced by m_privmsg().
| void bs_init | ( | void | ) |
Definition at line 72 of file botserv.c.
References moduleAddBotServCmds(), and s_BotServ.
Referenced by init_secondary().
| BotInfo* findbot | ( | char * | nick | ) |
Definition at line 612 of file botserv.c.
References botlists, find_nickuid(), ircd, botinfo_::next, botinfo_::nick, stricmp(), tolower, ircdvars_::ts6, and UseTS6.
| void get_botserv_stats | ( | long * | nrec, | |
| long * | memuse | |||
| ) |
Definition at line 46 of file botserv.c.
References botlists, botinfo_::host, botinfo_::next, botinfo_::nick, botinfo_::real, and botinfo_::user.
Referenced by do_stats().
| void insert_bot | ( | BotInfo * | bi | ) |
Definition at line 566 of file botserv.c.
References botlists, botinfo_::next, botinfo_::nick, botinfo_::prev, stricmp(), and tolower.
| void load_bs_dbase | ( | void | ) |
Definition at line 442 of file botserv.c.
References BOT_VERSION, BotDBName, botinfo_::chancount, close_db(), botinfo_::created, fatal(), botinfo_::flags, get_file_version(), getc_db, botinfo_::host, makebot(), open_db(), read_int16(), read_int32(), read_string(), botinfo_::real, s_BotServ, SAFE, and botinfo_::user.
Referenced by init_secondary().
| BotInfo* makebot | ( | char * | nick | ) |
Definition at line 585 of file botserv.c.
References alog(), debug, insert_bot(), botinfo_::lastmsg, nbots, botinfo_::nick, scalloc(), and sstrdup().
Referenced by db_mysql_load_bs_dbase(), do_bot(), and load_bs_dbase().
| void moduleAddBotServCmds | ( | void | ) |
Definition at line 37 of file botserv.c.
References BotServCoreModules, BotServCoreNumber, and modules_core_init().
Referenced by bs_init().
| char* normalizeBuffer | ( | char * | buf | ) |
Normalize buffer stripping control characters and colors
| A | string to be parsed for control and color codes |
Definition at line 1061 of file botserv.c.
References smalloc().
Referenced by bahamut_cmd_ctcp(), botchanmsgs(), charybdis_cmd_ctcp(), delete_user(), do_nick(), dreamforge_cmd_ctcp(), hsreq_load_db(), hybrid_cmd_ctcp(), inspircd_cmd_ctcp(), moduleGetConfigDirective(), plexus_cmd_ctcp(), ptlink_cmd_ctcp(), rageircd_cmd_ctcp(), ratbox_cmd_ctcp(), shadowircd_cmd_ctcp(), solidircd_cmd_ctcp(), ultimate2_cmd_ctcp(), ultimate3_cmd_ctcp(), unreal_cmd_ctcp(), and viagra_cmd_ctcp().
| void save_bs_dbase | ( | void | ) |
Definition at line 498 of file botserv.c.
References BOT_VERSION, BotDBName, botlists, botinfo_::chancount, close_db(), botinfo_::created, botinfo_::flags, botinfo_::host, botinfo_::next, botinfo_::nick, open_db(), botinfo_::real, s_BotServ, SAFE, botinfo_::user, write_int16(), write_int32(), write_int8, and write_string().
Referenced by save_databases().
| void save_bs_rdb_dbase | ( | void | ) |
Definition at line 530 of file botserv.c.
References alog(), botlists, botinfo_::next, rdb_clean_table(), rdb_close(), rdb_open(), rdb_save_bs_core(), and rdb_tag_table().
Referenced by save_databases().
| void unassign | ( | User * | u, | |
| ChannelInfo * | ci | |||
| ) |
Definition at line 644 of file botserv.c.
References anope_cmd_part(), chaninfo_::bi, BSMinUsers, chaninfo_::c, botinfo_::chancount, EVENT_BOT_UNASSIGN, chaninfo_::name, user_::nick, botinfo_::nick, send_event(), and channel_::usercount.
Referenced by do_assign(), do_set(), and do_unassign().
1.5.1-20070107