From 8e425f4137f87d4b537d60df4206b221889d2121 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Sat, 17 Jan 2009 01:18:19 +0100 Subject: [PATCH] Replace parv[0] with source_p->name. --- extensions/m_mkpasswd.c | 6 +++--- extensions/m_okick.c | 6 +++--- modules/core/m_kill.c | 6 +++--- modules/core/m_nick.c | 10 +++++----- modules/core/m_squit.c | 2 +- modules/m_connect.c | 2 +- modules/m_pong.c | 2 +- modules/m_userhost.c | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/extensions/m_mkpasswd.c b/extensions/m_mkpasswd.c index 16b76f1..d0e9d6e 100644 --- a/extensions/m_mkpasswd.c +++ b/extensions/m_mkpasswd.c @@ -56,7 +56,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha if((last_used + ConfigFileEntry.pace_wait) > rb_current_time()) { /* safe enough to give this on a local connect only */ - sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, parv[0], "MKPASSWD"); + sendto_one(source_p, form_str(RPL_LOAD2HI), me.name, source_p->name, "MKPASSWD"); return 0; } else @@ -85,7 +85,7 @@ m_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const cha } if(parc == 1) - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD"); + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "MKPASSWD"); else sendto_one_notice(source_p, ":Encryption for [%s]: %s", parv[1], rb_crypt(parv[1], @@ -127,7 +127,7 @@ mo_mkpasswd(struct Client *client_p, struct Client *source_p, int parc, const ch } if(parc == 1) - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "MKPASSWD"); + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "MKPASSWD"); else sendto_one_notice(source_p, ":Encryption for [%s]: %s", parv[1], rb_crypt(parv[1], is_md5 ? make_md5_salt() : make_salt())); diff --git a/extensions/m_okick.c b/extensions/m_okick.c index e5367c3..3c53294 100644 --- a/extensions/m_okick.c +++ b/extensions/m_okick.c @@ -73,7 +73,7 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char if(*parv[2] == '\0') { - sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, parv[0], "KICK"); + sendto_one(source_p, form_str(ERR_NEEDMOREPARAMS), me.name, source_p->name, "KICK"); return 0; } @@ -108,14 +108,14 @@ mo_okick(struct Client *client_p, struct Client *source_p, int parc, const char if((target_p = find_client(user)) == NULL) { - sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, parv[0], user); + sendto_one(source_p, form_str(ERR_NOSUCHNICK), me.name, source_p->name, user); return 0; } if((msptr = find_channel_membership(chptr, target_p)) == NULL) { sendto_one(source_p, form_str(ERR_USERNOTINCHANNEL), - me.name, parv[0], parv[1], parv[2]); + me.name, source_p->name, parv[1], parv[2]); return 0; } diff --git a/modules/core/m_kill.c b/modules/core/m_kill.c index ad286d5..c265187 100644 --- a/modules/core/m_kill.c +++ b/modules/core/m_kill.c @@ -126,7 +126,7 @@ mo_kill(struct Client *client_p, struct Client *source_p, int parc, const char * sendto_realops_snomask(SNO_GENERAL, L_ALL, "Received KILL message for %s!%s@%s. From %s Path: %s (%s)", target_p->name, target_p->username, target_p->orighost, - parv[0], me.name, reason); + source_p->name, me.name, reason); ilog(L_KILL, "%c %s %s!%s@%s %s %s", MyConnect(target_p) ? 'L' : 'G', get_oper_name(source_p), @@ -245,7 +245,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char * { sendto_realops_snomask(IsService(source_p) ? SNO_SKILL : SNO_GENERAL, L_ALL, "Received KILL message for %s!%s@%s. From %s Path: %s!%s!%s!%s %s", - target_p->name, target_p->username, target_p->orighost, parv[0], + target_p->name, target_p->username, target_p->orighost, source_p->name, source_p->servptr->name, source_p->host, source_p->username, source_p->name, reason); @@ -259,7 +259,7 @@ ms_kill(struct Client *client_p, struct Client *source_p, int parc, const char * sendto_realops_snomask(SNO_SKILL, L_ALL, "Received KILL message for %s!%s@%s. From %s %s", target_p->name, target_p->username, target_p->orighost, - parv[0], reason); + source_p->name, reason); ilog(L_KILL, "S %s %s!%s@%s %s %s", source_p->name, target_p->name, target_p->username, diff --git a/modules/core/m_nick.c b/modules/core/m_nick.c index 81d5c6b..7335399 100644 --- a/modules/core/m_nick.c +++ b/modules/core/m_nick.c @@ -145,7 +145,7 @@ mr_nick(struct Client *client_p, struct Client *source_p, int parc, const char * if(!clean_nick(nick, 1)) { sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), - me.name, EmptyString(parv[0]) ? "*" : parv[0], parv[1]); + me.name, EmptyString(source_p->name) ? "*" : source_p->name, parv[1]); return 0; } @@ -208,7 +208,7 @@ m_nick(struct Client *client_p, struct Client *source_p, int parc, const char *p /* check the nickname is ok */ if(!clean_nick(nick, 1)) { - sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), me.name, parv[0], nick); + sendto_one(source_p, form_str(ERR_ERRONEUSNICKNAME), me.name, source_p->name, nick); return 0; } @@ -245,7 +245,7 @@ m_nick(struct Client *client_p, struct Client *source_p, int parc, const char *p change_local_nick(client_p, source_p, nick, 1); } else - sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, parv[0], nick); + sendto_one(source_p, form_str(ERR_NICKNAMEINUSE), me.name, source_p->name, nick); return 0; } @@ -389,7 +389,7 @@ ms_uid(struct Client *client_p, struct Client *source_p, int parc, const char *p { char *s = LOCAL_COPY(parv[9]); sendto_realops_snomask(SNO_GENERAL, L_ALL, "Long realname from server %s for %s", - parv[0], parv[1]); + source_p->name, parv[1]); s[REALLEN] = '\0'; parv[9] = s; } @@ -490,7 +490,7 @@ ms_euid(struct Client *client_p, struct Client *source_p, int parc, const char * { char *s = LOCAL_COPY(parv[11]); sendto_realops_snomask(SNO_GENERAL, L_ALL, "Long realname from server %s for %s", - parv[0], parv[1]); + source_p->name, parv[1]); s[REALLEN] = '\0'; parv[11] = s; } diff --git a/modules/core/m_squit.c b/modules/core/m_squit.c index 2836221..e53e291 100644 --- a/modules/core/m_squit.c +++ b/modules/core/m_squit.c @@ -148,7 +148,7 @@ ms_squit(struct Client *client_p, struct Client *source_p, int parc, const char ":%s WALLOPS :Remote SQUIT %s from %s (%s)", me.id, target_p->name, source_p->name, comment); - ilog(L_SERVER, "SQUIT From %s : %s (%s)", parv[0], target_p->name, comment); + ilog(L_SERVER, "SQUIT From %s : %s (%s)", source_p->name, target_p->name, comment); } exit_client(client_p, target_p, source_p, comment); return 0; diff --git a/modules/m_connect.c b/modules/m_connect.c index d1b77a8..809783a 100644 --- a/modules/m_connect.c +++ b/modules/m_connect.c @@ -129,7 +129,7 @@ mo_connect(struct Client *client_p, struct Client *source_p, int parc, const cha * Notify all operators about remote connect requests */ - ilog(L_SERVER, "CONNECT From %s : %s %s", parv[0], parv[1], parc > 2 ? parv[2] : ""); + ilog(L_SERVER, "CONNECT From %s : %s %s", source_p->name, parv[1], parc > 2 ? parv[2] : ""); server_p->port = port; /* diff --git a/modules/m_pong.c b/modules/m_pong.c index e5fb98e..3d83249 100644 --- a/modules/m_pong.c +++ b/modules/m_pong.c @@ -127,7 +127,7 @@ mr_pong(struct Client *client_p, struct Client *source_p, int parc, const char * } else - sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, parv[0]); + sendto_one(source_p, form_str(ERR_NOORIGIN), me.name, source_p->name); source_p->flags &= ~FLAGS_PINGSENT; diff --git a/modules/m_userhost.c b/modules/m_userhost.c index c819764..108974e 100644 --- a/modules/m_userhost.c +++ b/modules/m_userhost.c @@ -63,7 +63,7 @@ m_userhost(struct Client *client_p, struct Client *source_p, int parc, const cha int cur_len; int rl; - cur_len = rb_sprintf(buf, form_str(RPL_USERHOST), me.name, parv[0], ""); + cur_len = rb_sprintf(buf, form_str(RPL_USERHOST), me.name, source_p->name, ""); t = buf + cur_len; for (i = 1; i <= 5; i++)