#include "stdinc.h"
#include "tools.h"
#include "s_user.h"
#include "s_misc.h"
#include "channel.h"
#include "channel_mode.h"
#include "client.h"
#include "common.h"
#include "fdlist.h"
#include "hash.h"
#include "irc_string.h"
#include "sprintf_irc.h"
#include "s_bsd.h"
#include "irc_getnameinfo.h"
#include "ircd.h"
#include "list.h"
#include "listener.h"
#include "motd.h"
#include "numeric.h"
#include "s_conf.h"
#include "s_log.h"
#include "s_serv.h"
#include "s_stats.h"
#include "send.h"
#include "supported.h"
#include "whowas.h"
#include "memory.h"
#include "packet.h"
#include "userhost.h"
#include "hook.h"
#include "msg.h"
#include "pcre.h"
Vai al codice sorgente di questo file.
Strutture dati | |
struct | Isupport |
Funzioni | |
static void | user_welcome (struct Client *) |
static void | report_and_set_user_flags (struct Client *, const struct AccessItem *) |
static int | check_xline (struct Client *) |
static void | introduce_client (struct Client *, struct Client *) |
static void * | uid_get (va_list) |
void | assemble_umode_buffer (void) |
void | show_lusers (struct Client *source_p) |
void | show_isupport (struct Client *source_p) |
void | register_local_user (struct Client *client_p, struct Client *source_p, const char *nick, const char *username) |
void | register_remote_user (struct Client *client_p, struct Client *source_p, const char *username, const char *host, const char *server, const char *realname) |
int | valid_hostname (const char *hostname) |
int | valid_username (const char *username) |
void | do_local_user (const char *nick, struct Client *client_p, struct Client *source_p, const char *username, const char *host, const char *server, const char *realname) |
static void * | change_simple_umode (va_list args) |
void | set_user_mode (struct Client *client_p, struct Client *source_p, int parc, char *parv[]) |
void | send_umode (struct Client *client_p, struct Client *source_p, unsigned int old, unsigned int sendmask, char *umode_buf) |
void | send_umode_out (struct Client *client_p, struct Client *source_p, unsigned int old) |
void | oper_up (struct Client *source_p) |
int | valid_sid (const char *sid) |
void | init_uid (void) |
static void | add_one_to_uid (int i) |
void | init_isupport (void) |
void | add_isupport (const char *name, const char *options, int n) |
void | delete_isupport (const char *name) |
void | rebuild_isupport_message_line (void) |
Variabili | |
int | MaxClientCount = 1 |
int | MaxConnectionCount = 1 |
struct Callback * | entering_umode_cb = NULL |
struct Callback * | umode_cb = NULL |
struct Callback * | uid_get_cb = NULL |
static char | umode_buffer [IRCD_BUFSIZE] |
static dlink_list | support_list = { NULL, NULL, 0 } |
MessageFile * | isupportFile |
unsigned int | user_modes [256] |
static char | new_uid [TOTALSIDUID+1] |
void add_isupport | ( | const char * | name, | |
const char * | options, | |||
int | n | |||
) |
Definizione alla linea 1462 del file s_user.c.
Riferimenti _dlink_node::data, DLINK_FOREACH, dlinkAddTail(), DupString, _dlink_list::head, irccmp(), MyFree(), MyMalloc(), Isupport::name, Isupport::node, Isupport::number, Isupport::options, e rebuild_isupport_message_line().
Referenziato da _modinit(), init_isupport(), e read_conf_files().
static void add_one_to_uid | ( | int | i | ) | [static] |
Definizione alla linea 1386 del file s_user.c.
Riferimenti IRC_MAXSID, IRC_MAXUID, e new_uid.
Referenziato da uid_get().
void assemble_umode_buffer | ( | void | ) |
Definizione alla linea 163 del file s_user.c.
Riferimenti umode_buffer, e user_modes.
Referenziato da _moddeinit(), _modinit(), e main().
static void* change_simple_umode | ( | va_list | args | ) | [static] |
Definizione alla linea 877 del file s_user.c.
Riferimenti MODE_ADD, e Client::umodes.
Referenziato da init_uid().
static int check_xline | ( | struct Client * | source_p | ) | [static] |
Definizione alla linea 1234 del file s_user.c.
Riferimenti MatchItem::count, CurrentTime, exit_client(), find_matching_name_conf(), get_client_name(), HIDE_IP, Client::info, ServerStatistics::is_ref, L_ALL, Client::localClient, map_to_conf(), me, Client::name, MatchItem::reason, LocalUser::reject_delay, REJECT_HOLD_TIME, RXLINE_TYPE, sendto_one(), sendto_realops_flags(), ServerStats, SetCaptured, Client::sockhost, UMODE_REJ, e XLINE_TYPE.
Referenziato da register_local_user().
void delete_isupport | ( | const char * | name | ) |
Definizione alla linea 1500 del file s_user.c.
Riferimenti _dlink_node::data, DLINK_FOREACH, dlinkDelete(), _dlink_list::head, irccmp(), MyFree(), Isupport::name, Isupport::options, e rebuild_isupport_message_line().
Referenziato da _moddeinit(), e clear_out_old_conf().
void do_local_user | ( | const char * | nick, | |
struct Client * | client_p, | |||
struct Client * | source_p, | |||
const char * | username, | |||
const char * | host, | |||
const char * | server, | |||
const char * | realname | |||
) |
Definizione alla linea 828 del file s_user.c.
Riferimenti Client::client_host, Client::client_server, ERR_ALREADYREGISTRED, form_str(), Client::info, IsGotId, IsUnknown, Client::localClient, me, Client::name, REG_NEED_USER, register_local_user(), LocalUser::registration, sendto_one(), Client::servptr, strlcpy(), e Client::username.
Referenziato da mr_user().
void init_isupport | ( | void | ) |
Definizione alla linea 1432 del file s_user.c.
Riferimenti add_isupport(), CASEMAP, init_MessageLine(), KICKLEN, MAXMODEPARAMS, NICKLEN, e TOPICLEN.
Referenziato da initialize_message_files().
void init_uid | ( | void | ) |
Definizione alla linea 1347 del file s_user.c.
Riferimenti change_simple_umode(), hash_add_id(), Client::id, IRC_MAXSID, IRC_MAXUID, me, new_uid, register_callback(), ServerInfo, server_info::sid, strlcpy(), e uid_get().
Referenziato da main().
Definizione alla linea 593 del file s_user.c.
Riferimenti CAP_LL, CAP_TS6, _dlink_node::data, DLINK_FOREACH, HasID, _dlink_list::head, Client::hopcount, Client::host, server_info::hub, Client::id, Client::info, IsCapable, IsIPSpoof, MyClient, Client::name, send_umode(), SEND_UMODES, sendto_one(), serv_list, ServerInfo, Client::servptr, Client::sockhost, Client::tsinfo, uplink, e Client::username.
Referenziato da register_local_user(), e register_remote_user().
void oper_up | ( | struct Client * | source_p | ) |
Definizione alla linea 1282 del file s_user.c.
Riferimenti ConfigFileEntry, LocalUser::confs, Count, dlinkAdd(), dlinkFind(), form_str(), _dlink_list::head, Client::host, IsOperAdmin, IsOperHiddenAdmin, IsOperN, L_ALL, Client::localClient, make_dlink_node(), map_to_conf(), me, AccessItem::modes, Client::name, Counter::oper, oper_list, oper_privs_as_string(), config_file_entry::oper_umodes, config_file_entry::opermotd, AccessItem::port, RPL_YOUREOPER, send_message_file(), send_umode_out(), sendto_one(), sendto_realops_flags(), SetOFlag, SetOper, UMODE_ADMIN, UMODE_ALL, UMODE_LOCOPS, UMODE_NCHANGE, UMODE_OPERWALL, UMODE_SERVNOTICE, UMODE_WALLOP, Client::umodes, e Client::username.
Referenziato da m_challenge(), e m_oper().
void rebuild_isupport_message_line | ( | void | ) |
Definizione alla linea 1529 del file s_user.c.
Riferimenti addto_MessageLine(), _dlink_node::data, destroy_MessageLine(), DLINK_FOREACH, form_str(), _dlink_list::head, HOSTLEN, IRCD_BUFSIZE, ircsprintf(), MAXPARA, me, Isupport::name, Client::name, Isupport::number, Isupport::options, e RPL_ISUPPORT.
Referenziato da add_isupport(), delete_isupport(), quote_msglocale(), e read_conf_files().
void register_local_user | ( | struct Client * | client_p, | |
struct Client * | source_p, | |||
const char * | nick, | |||
const char * | username | |||
) |
Definizione alla linea 285 del file s_user.c.
Riferimenti add_user_host(), LocalUser::allow_read, CAP_TS6, check_xline(), ClearCap, client_check_cb, Client::client_host, Client::client_server, ConfigFileEntry, LocalUser::confs, Count, CurrentTime, _dlink_node::data, dlinkAdd(), dlinkFindDelete(), EmptyString, ERR_PASSWDMISMATCH, execute_callback(), exit_client(), form_str(), free_dlink_node(), get_client_class(), hash_add_id(), hash_find_id(), HasPingCookie, _dlink_list::head, config_file_entry::hide_spoof_ips, Client::host, HOSTIPLEN, Client::id, Client::info, introduce_client(), Counter::invisi, config_file_entry::invisible_on_connect, LocalUser::ip, irc_getnameinfo(), IRCD_BUFSIZE, ircsprintf(), ServerStatistics::is_ref, IsDead, IsExemptLimits, IsGotId, IsIPSpoof, IsNeedIdentd, IsNoTilde, IsPingSent, L_ALL, LocalUser::last, LocalUser::lclient_node, Client::lnode, Counter::local, local_client_list, Client::localClient, map_to_conf(), match_conf_password(), MAX_BUFFER, server_info::max_clients, MAX_FLOOD_BURST, Counter::max_loc, Counter::max_tot, me, MyConnect, Client::name, NI_NUMERICHOST, LocalUser::passwd, AccessItem::passwd, config_file_entry::ping_cookie, LocalUser::random_ping, LocalUser::registration, report_and_set_user_flags(), sendto_one(), sendto_realops_flags(), Client::serv, ServerInfo, ServerStats, Client::servptr, SetClient, SetPingSent, SetUserHost, Client::sockhost, irc_ssaddr::ss_len, strlcpy(), Counter::total, Counter::totalrestartcount, uid_get(), UMODE_ALL, UMODE_CCONN, UMODE_CCONN_FULL, UMODE_FULL, UMODE_INVISIBLE, UMODE_REJ, Client::umodes, unknown_list, user_welcome(), USERLEN, Client::username, Server::users, valid_hostname(), e valid_username().
Referenziato da cap_end(), do_local_user(), mr_pong(), e set_initial_nick().
void register_remote_user | ( | struct Client * | client_p, | |
struct Client * | source_p, | |||
const char * | username, | |||
const char * | host, | |||
const char * | server, | |||
const char * | realname | |||
) |
Definizione alla linea 519 del file s_user.c.
Riferimenti add_user_host(), Count, Server::dep_users, dlinkAdd(), exit_client(), find_server(), Client::from, Client::host, Client::info, introduce_client(), kill_client(), L_ALL, Client::lnode, Counter::max_tot, me, Client::name, sendto_realops_flags(), Client::serv, Client::servptr, SetClient, SetKilled, SetUserHost, strlcpy(), Counter::total, UMODE_ALL, UMODE_DEBUG, Client::username, e Server::users.
Referenziato da client_from_server(), e nick_from_server().
static void report_and_set_user_flags | ( | struct Client * | source_p, | |
const struct AccessItem * | aconf | |||
) | [static] |
Definizione alla linea 758 del file s_user.c.
Riferimenti IsConfCanFlood, IsConfDoSpoofIp, IsConfExemptGline, IsConfExemptKline, IsConfExemptLimits, IsConfExemptResv, IsConfIdlelined, me, Client::name, sendto_one(), SetCanFlood, SetExemptGline, SetExemptKline, SetExemptLimits, SetExemptResv, e SetIdlelined.
Referenziato da register_local_user().
void send_umode | ( | struct Client * | client_p, | |
struct Client * | source_p, | |||
unsigned int | old, | |||
unsigned int | sendmask, | |||
char * | umode_buf | |||
) |
Definizione alla linea 1079 del file s_user.c.
Riferimenti Client::host, MODE_ADD, MODE_DEL, MyClient, Client::name, sendto_one(), Client::umodes, user_modes, e Client::username.
Referenziato da introduce_client(), send_umode_out(), e sendnick_TS().
Definizione alla linea 1139 del file s_user.c.
Riferimenti buf, CAP_LL, _dlink_node::data, DLINK_FOREACH, _dlink_list::head, server_info::hub, ID_or_name, IRCD_BUFSIZE, IsCapable, IsOperHiddenAdmin, Client::lazyLinkClientExists, Client::localClient, MyClient, send_umode(), SEND_UMODES, sendto_one(), serv_list, ServerInfo, LocalUser::serverMask, e UMODE_ADMIN.
Referenziato da m_flags(), mo_flags(), oper_up(), e set_user_mode().
Definizione alla linea 905 del file s_user.c.
Riferimenti buf, ClearOper, ClearOperFlags, ConfigFileEntry, Count, detach_conf(), dlinkFindDelete(), ERR_NOSUCHCHANNEL, ERR_UMODEUNKNOWNFLAG, ERR_USERSDONTMATCH, execute_callback(), find_person(), form_str(), free_dlink_node(), Client::from, Counter::invisi, IRCD_BUFSIZE, IsInvisible, IsOper, IsOperAdmin, IsOperHiddenAdmin, IsOperN, IsServer, L_ADMIN, me, MODE_ADD, MODE_DEL, MyConnect, Client::name, Counter::oper, oper_list, config_file_entry::oper_only_umodes, OPER_TYPE, RPL_UMODEIS, send_umode_out(), sendto_one(), sendto_realops_flags(), SetOper, UMODE_ADMIN, UMODE_ALL, UMODE_INVISIBLE, UMODE_NCHANGE, Client::umodes, e user_modes.
void show_isupport | ( | struct Client * | source_p | ) |
Definizione alla linea 256 del file s_user.c.
Riferimenti send_message_file().
Referenziato da m_version(), mo_version(), ms_version(), e user_welcome().
void show_lusers | ( | struct Client * | source_p | ) |
Definizione alla linea 182 del file s_user.c.
Riferimenti CAP_TS6, ConfigServerHide, Count, dlink_list_length, form_str(), Client::from, from, global_channel_list, global_serv_list, HasID, config_server_hide::hide_servers, Client::id, Counter::invisi, IsCapable, IsOper, Counter::local, Counter::max_loc, Counter::max_tot, MaxClientCount, MaxConnectionCount, me, MyConnect, Counter::myserver, Client::name, Counter::oper, RPL_GLOBALUSERS, RPL_LOCALUSERS, RPL_LUSERCHANNELS, RPL_LUSERCLIENT, RPL_LUSERME, RPL_LUSEROP, RPL_LUSERUNKNOWN, RPL_STATSCONN, sendto_one(), to, Counter::total, Counter::totalrestartcount, e unknown_list.
Referenziato da m_lusers(), ms_lusers(), e user_welcome().
static void * uid_get | ( | va_list | args | ) | [static] |
Definizione alla linea 1418 del file s_user.c.
Riferimenti add_one_to_uid(), new_uid, e TOTALSIDUID.
Referenziato da init_uid(), e register_local_user().
static void user_welcome | ( | struct Client * | source_p | ) | [static] |
Definizione alla linea 1177 del file s_user.c.
Riferimenti ConfigFileEntry, LocalUser::fd, form_str(), get_listener_name(), Client::id, ircd_version, MessageFile::lastChangedDate, LocalUser::listener, Client::localClient, me, config_file_entry::motd, Client::name, server_info::network_name, RPL_CREATED, RPL_ENDOFMOTD, RPL_MOTD, RPL_MOTDSTART, RPL_MYINFO, RPL_WELCOME, RPL_YOURHOST, RPL_YOURID, send_message_file(), sendto_one(), ServerInfo, config_file_entry::short_motd, show_isupport(), show_lusers(), _fde::ssl, e umode_buffer.
Referenziato da register_local_user().
int valid_hostname | ( | const char * | hostname | ) |
Definizione alla linea 683 del file s_user.c.
Riferimenti IsHostChar.
Referenziato da mo_chghost(), e register_local_user().
int valid_sid | ( | const char * | sid | ) |
int valid_username | ( | const char * | username | ) |
Definizione alla linea 714 del file s_user.c.
Riferimenti ConfigFileEntry, config_file_entry::dots_in_ident, IsAlNum, e IsUserChar.
Referenziato da mo_chgident(), e register_local_user().
struct Callback* entering_umode_cb = NULL |
int MaxClientCount = 1 |
int MaxConnectionCount = 1 |
char new_uid[TOTALSIDUID+1] [static] |
Definizione alla linea 1323 del file s_user.c.
Referenziato da add_one_to_uid(), init_uid(), e uid_get().
dlink_list support_list = { NULL, NULL, 0 } [static] |
struct Callback* uid_get_cb = NULL |
char umode_buffer[IRCD_BUFSIZE] [static] |
Definizione alla linea 65 del file s_user.c.
Referenziato da assemble_umode_buffer(), e user_welcome().
unsigned int user_modes[256] |
Definizione alla linea 89 del file s_user.c.
Referenziato da _moddeinit(), _modinit(), assemble_umode_buffer(), client_from_server(), nick_from_server(), send_umode(), e set_user_mode().