mirror of
https://github.com/pissnet/pissircd.git
synced 2025-08-13 21:51:36 +01:00
get_sno_str -> get_snomask_string, get_mode_str -> get_usermode_string,
get_snostr -> get_snomask_string_raw, get_modestr -> get_usermode_string_raw
This commit is contained in:
parent
9b15c758cd
commit
52c8ef3815
11 changed files with 23 additions and 23 deletions
|
@ -99,7 +99,7 @@ extern EVENT(e_clean_out_throttling_buckets);
|
|||
|
||||
extern void module_loadall(void);
|
||||
extern long set_usermode(char *umode);
|
||||
extern char *get_modestr(long umodes);
|
||||
extern char *get_usermode_string_raw(long umodes);
|
||||
extern void config_error(FORMAT_STRING(const char *format), ...) __attribute__((format(printf,1,2)));
|
||||
extern void config_warn(FORMAT_STRING(const char *format), ...) __attribute__((format(printf,1,2)));
|
||||
extern void config_error_missing(const char *filename, int line, const char *entry);
|
||||
|
@ -168,7 +168,7 @@ extern void add_server_to_table(Client *);
|
|||
extern void remove_server_from_table(Client *);
|
||||
extern void iNAH_host(Client *client, char *host);
|
||||
extern void set_snomask(Client *client, char *snomask);
|
||||
extern char *get_sno_str(Client *client);
|
||||
extern char *get_snomask_string(Client *client);
|
||||
extern int check_tkls(Client *cptr);
|
||||
/* for services */
|
||||
extern void del_invite(Client *, Channel *);
|
||||
|
@ -571,7 +571,7 @@ extern void extcmode_free_paramlist(void **ar);
|
|||
|
||||
extern void chmode_str(struct ChMode *, char *, char *, size_t, size_t);
|
||||
extern char *get_client_status(Client *);
|
||||
extern char *get_snostr(long);
|
||||
extern char *get_snomask_string_raw(long);
|
||||
extern void SocketLoop(void *);
|
||||
#ifdef _WIN32
|
||||
extern void InitDebug(void);
|
||||
|
|
|
@ -53,7 +53,7 @@ extern void read_motd(const char *filename, MOTDFile *motd);
|
|||
/* s_user.c */
|
||||
extern int target_limit_exceeded(Client *client, void *target, const char *name);
|
||||
extern void make_umodestr(void);
|
||||
extern char *get_mode_str(Client *acptr);
|
||||
extern char *get_usermode_string(Client *acptr);
|
||||
|
||||
/* s_misc.c */
|
||||
extern char *convert_time(time_t ltime);
|
||||
|
|
|
@ -330,7 +330,7 @@ void SnomaskDel(Snomask *sno)
|
|||
oldsno = client->user->snomask;
|
||||
client->user->snomask &= ~sno->mode;
|
||||
if (oldsno != client->user->snomask)
|
||||
sendnumeric(client, RPL_SNOMASK, get_snostr(client->user->snomask));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string_raw(client->user->snomask));
|
||||
}
|
||||
|
||||
sno->flag = '\0';
|
||||
|
@ -439,7 +439,7 @@ void unload_all_unused_snomasks(void)
|
|||
oldsno = client->user->snomask;
|
||||
client->user->snomask &= ~(removed_sno);
|
||||
if (oldsno != client->user->snomask)
|
||||
sendnumeric(client, RPL_SNOMASK, get_snostr(client->user->snomask));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string_raw(client->user->snomask));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1605,9 +1605,9 @@ CMD_FUNC(_cmd_umode)
|
|||
|
||||
if (parc < 3)
|
||||
{
|
||||
sendnumeric(client, RPL_UMODEIS, get_mode_str(client));
|
||||
sendnumeric(client, RPL_UMODEIS, get_usermode_string(client));
|
||||
if (client->user->snomask)
|
||||
sendnumeric(client, RPL_SNOMASK, get_sno_str(client));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string(client));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1903,7 +1903,7 @@ CMD_FUNC(_cmd_umode)
|
|||
send_umode_out(client, 1, oldumodes);
|
||||
|
||||
if (MyConnect(client) && setsnomask != client->user->snomask)
|
||||
sendnumeric(client, RPL_SNOMASK, get_sno_str(client));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string(client));
|
||||
}
|
||||
|
||||
CMD_FUNC(cmd_mlock)
|
||||
|
|
|
@ -1110,7 +1110,7 @@ int _register_user(Client *client, char *nick, char *username, char *umode, char
|
|||
sendto_one(client, NULL, ":%s MODE %s :%s", client->name,
|
||||
client->name, buf);
|
||||
if (user->snomask)
|
||||
sendnumeric(client, RPL_SNOMASK, get_snostr(user->snomask));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string_raw(user->snomask));
|
||||
|
||||
if (!IsSecure(client) && !IsLocalhost(client) && (iConf.plaintext_policy_user == POLICY_WARN))
|
||||
sendnotice(client, "%s", iConf.plaintext_policy_user_message);
|
||||
|
|
|
@ -187,10 +187,10 @@ CMD_FUNC(cmd_oper)
|
|||
sendnumericfmt(client, ERR_NOOPERHOST, "You are missing user modes required to OPER");
|
||||
sendto_snomask_global
|
||||
(SNO_OPER, "Failed OPER attempt by %s (%s@%s) [lacking modes '%s' in oper::require-modes]",
|
||||
client->name, client->user->username, client->local->sockhost, get_modestr(operblock->require_modes & ~client->umodes));
|
||||
client->name, client->user->username, client->local->sockhost, get_usermode_string_raw(operblock->require_modes & ~client->umodes));
|
||||
ircd_log(LOG_OPER, "OPER MISSINGMODES (%s) by (%s!%s@%s), needs modes=%s",
|
||||
name, client->name, client->user->username, client->local->sockhost,
|
||||
get_modestr(operblock->require_modes & ~client->umodes));
|
||||
get_usermode_string_raw(operblock->require_modes & ~client->umodes));
|
||||
client->local->since += 7;
|
||||
return;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@ CMD_FUNC(cmd_oper)
|
|||
}
|
||||
|
||||
send_umode_out(client, 1, old_umodes);
|
||||
sendnumeric(client, RPL_SNOMASK, get_sno_str(client));
|
||||
sendnumeric(client, RPL_SNOMASK, get_snomask_string(client));
|
||||
|
||||
list_add(&client->special_node, &oper_list);
|
||||
|
||||
|
|
|
@ -791,8 +791,8 @@ int stats_set(Client *client, char *para)
|
|||
sendtxtnumeric(client, "kline-address: %s", KLINE_ADDRESS);
|
||||
if (GLINE_ADDRESS)
|
||||
sendtxtnumeric(client, "gline-address: %s", GLINE_ADDRESS);
|
||||
sendtxtnumeric(client, "modes-on-connect: %s", get_modestr(CONN_MODES));
|
||||
sendtxtnumeric(client, "modes-on-oper: %s", get_modestr(OPER_MODES));
|
||||
sendtxtnumeric(client, "modes-on-connect: %s", get_usermode_string_raw(CONN_MODES));
|
||||
sendtxtnumeric(client, "modes-on-oper: %s", get_usermode_string_raw(OPER_MODES));
|
||||
*modebuf = *parabuf = 0;
|
||||
chmode_str(&iConf.modes_on_join, modebuf, parabuf, sizeof(modebuf), sizeof(parabuf));
|
||||
sendtxtnumeric(client, "modes-on-join: %s %s", modebuf, parabuf);
|
||||
|
|
|
@ -119,7 +119,7 @@ void do_svssno(Client *client, int parc, char *parv[], int show_change)
|
|||
}
|
||||
|
||||
if (show_change)
|
||||
sendnumeric(target, RPL_SNOMASK, get_sno_str(target));
|
||||
sendnumeric(target, RPL_SNOMASK, get_snomask_string(target));
|
||||
}
|
||||
|
||||
CMD_FUNC(cmd_svssno)
|
||||
|
|
|
@ -135,11 +135,11 @@ CMD_FUNC(cmd_whois)
|
|||
if (IsOper(client) || target == client)
|
||||
{
|
||||
char sno[128];
|
||||
strlcpy(sno, get_sno_str(target), sizeof(sno));
|
||||
strlcpy(sno, get_snomask_string(target), sizeof(sno));
|
||||
|
||||
/* send the target user's modes */
|
||||
sendnumeric(client, RPL_WHOISMODES, name,
|
||||
get_mode_str(target), sno[1] == 0 ? "" : sno);
|
||||
get_usermode_string(target), sno[1] == 0 ? "" : sno);
|
||||
}
|
||||
if ((target == client) || IsOper(client))
|
||||
{
|
||||
|
|
|
@ -777,7 +777,7 @@ static void do_who(Client *client, Client *acptr, Channel *channel, struct who_f
|
|||
if (HasField(fmt, FIELD_MODES))
|
||||
{
|
||||
if (IsOper(client))
|
||||
append_format(str, sizeof str, &pos, " %s", strtok(get_mode_str(acptr), "+"));
|
||||
append_format(str, sizeof str, &pos, " %s", strtok(get_usermode_string(acptr), "+"));
|
||||
else
|
||||
append_format(str, sizeof str, &pos, " %s", "*");
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ char *canonize(char *buffer)
|
|||
* @param client The client
|
||||
* @returns string of snomasks (temporary storage)
|
||||
*/
|
||||
char *get_sno_str(Client *client)
|
||||
char *get_snomask_string(Client *client)
|
||||
{
|
||||
int i;
|
||||
char *m;
|
||||
|
@ -261,7 +261,7 @@ char *get_sno_str(Client *client)
|
|||
* @param client The client
|
||||
* @returns string of user modes (temporary storage)
|
||||
*/
|
||||
char *get_mode_str(Client *client)
|
||||
char *get_usermode_string(Client *client)
|
||||
{
|
||||
int i;
|
||||
char *m;
|
||||
|
@ -280,7 +280,7 @@ char *get_mode_str(Client *client)
|
|||
* @param umodes The user modes that are set
|
||||
* @returns string of user modes (temporary storage)
|
||||
*/
|
||||
char *get_modestr(long umodes)
|
||||
char *get_usermode_string_raw(long umodes)
|
||||
{
|
||||
int i;
|
||||
char *m;
|
||||
|
@ -299,7 +299,7 @@ char *get_modestr(long umodes)
|
|||
* @param sno The snomasks that are set
|
||||
* @returns string of snomasks (temporary storage)
|
||||
*/
|
||||
char *get_snostr(long sno)
|
||||
char *get_snomask_string_raw(long sno)
|
||||
{
|
||||
int i;
|
||||
char *m;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue