summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-03-23 19:49:55 +0000
committermichael <michael@82007160-df01-0410-b94d-b575c5fd34c7>2014-03-23 19:49:55 +0000
commit54a00282d9f08314749db5bee8635abc40262c04 (patch)
treee098f24515f2fb56ae64b0b07aab1cbce6b3b623
parent3ae8f7036933cf9d8905ee19f5aee6473ac9adb7 (diff)
- Cleaned up find_chasing(). Removed useless third 'chasing' argument.
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@3193 82007160-df01-0410-b94d-b575c5fd34c7
-rw-r--r--include/client.h2
-rw-r--r--modules/core/m_kick.c3
-rw-r--r--modules/core/m_sjoin.c2
-rw-r--r--modules/m_dline.c4
-rw-r--r--src/channel_mode.c6
-rw-r--r--src/client.c11
-rw-r--r--src/conf.c2
7 files changed, 11 insertions, 19 deletions
diff --git a/include/client.h b/include/client.h
index 0334f1a..8646520 100644
--- a/include/client.h
+++ b/include/client.h
@@ -469,7 +469,7 @@ extern void dead_link_on_read(struct Client *, int);
extern void exit_aborted_clients(void);
extern void free_exited_clients(void);
extern struct Client *make_client(struct Client *);
-extern struct Client *find_chasing(struct Client *, const char *, int *const);
+extern struct Client *find_chasing(struct Client *, const char *);
extern struct Client *find_person(const struct Client *const, const char *);
extern const char *get_client_name(const struct Client *, enum addr_mask_type);
diff --git a/modules/core/m_kick.c b/modules/core/m_kick.c
index c4cec5e..54551ed 100644
--- a/modules/core/m_kick.c
+++ b/modules/core/m_kick.c
@@ -52,7 +52,6 @@ m_kick(struct Client *client_p, struct Client *source_p,
{
struct Client *who;
struct Channel *chptr;
- int chasing = 0;
char *comment;
char *name;
char *p = NULL;
@@ -160,7 +159,7 @@ m_kick(struct Client *client_p, struct Client *source_p,
if (*user == '\0')
return 0;
- if ((who = find_chasing(source_p, user, &chasing)) == NULL)
+ if ((who = find_chasing(source_p, user)) == NULL)
return 0;
if ((ms_target = find_channel_link(who, chptr)) != NULL)
diff --git a/modules/core/m_sjoin.c b/modules/core/m_sjoin.c
index 8d025f2..52bc69c 100644
--- a/modules/core/m_sjoin.c
+++ b/modules/core/m_sjoin.c
@@ -344,7 +344,7 @@ ms_sjoin(struct Client *client_p, struct Client *source_p,
}
} while (valid_mode);
- target_p = find_chasing(source_p, s, NULL);
+ target_p = find_chasing(source_p, s);
/*
* if the client doesnt exist, or if its fake direction/server, skip.
diff --git a/modules/m_dline.c b/modules/m_dline.c
index ffa8238..5667d44 100644
--- a/modules/m_dline.c
+++ b/modules/m_dline.c
@@ -181,7 +181,7 @@ mo_dline(struct Client *client_p, struct Client *source_p,
if ((t = parse_netmask(dlhost, NULL, &bits)) == HM_HOST)
{
- if ((target_p = find_chasing(source_p, dlhost, NULL)) == NULL)
+ if ((target_p = find_chasing(source_p, dlhost)) == NULL)
return 0;
if (!MyConnect(target_p))
@@ -301,7 +301,7 @@ ms_dline(struct Client *client_p, struct Client *source_p,
if ((t = parse_netmask(dlhost, NULL, &bits)) == HM_HOST)
{
- if ((target_p = find_chasing(source_p, dlhost, NULL)) == NULL)
+ if ((target_p = find_chasing(source_p, dlhost)) == NULL)
return 0;
if (!MyConnect(target_p))
diff --git a/src/channel_mode.c b/src/channel_mode.c
index 818c1ee..5ec5256 100644
--- a/src/channel_mode.c
+++ b/src/channel_mode.c
@@ -967,7 +967,7 @@ chm_voice(struct Client *client_p, struct Client *source_p,
opnick = parv[(*parn)++];
- if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
+ if ((targ_p = find_chasing(source_p, opnick)) == NULL)
return;
if (!IsClient(targ_p))
return;
@@ -1044,7 +1044,7 @@ chm_hop(struct Client *client_p, struct Client *source_p,
opnick = parv[(*parn)++];
- if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
+ if ((targ_p = find_chasing(source_p, opnick)) == NULL)
return;
if (!IsClient(targ_p))
return;
@@ -1120,7 +1120,7 @@ chm_op(struct Client *client_p, struct Client *source_p,
opnick = parv[(*parn)++];
- if ((targ_p = find_chasing(source_p, opnick, NULL)) == NULL)
+ if ((targ_p = find_chasing(source_p, opnick)) == NULL)
return;
if (!IsClient(targ_p))
return;
diff --git a/src/client.c b/src/client.c
index 253bbf4..b3e4a25 100644
--- a/src/client.c
+++ b/src/client.c
@@ -526,17 +526,13 @@ find_person(const struct Client *const client_p, const char *name)
/*
* find_chasing - find the client structure for a nick name (name)
* using history mechanism if necessary. If the client is not found,
- * an error message (NO SUCH NICK) is generated. If the client was found
- * through the history, chasing will be 1 and otherwise 0.
+ * an error message (NO SUCH NICK) is generated.
*/
struct Client *
-find_chasing(struct Client *source_p, const char *name, int *const chasing)
+find_chasing(struct Client *source_p, const char *name)
{
struct Client *who = find_person(source_p->from, name);
- if (chasing)
- *chasing = 0;
-
if (who)
return who;
@@ -552,9 +548,6 @@ find_chasing(struct Client *source_p, const char *name, int *const chasing)
return NULL;
}
- if (chasing)
- *chasing = 1;
-
return who;
}
diff --git a/src/conf.c b/src/conf.c
index 30f2113..60ac180 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -2031,7 +2031,7 @@ find_user_host(struct Client *source_p, char *user_host_or_nick,
/* Try to find user@host mask from nick */
/* Okay to use source_p as the first param, because source_p == client_p */
if ((target_p =
- find_chasing(source_p, user_host_or_nick, NULL)) == NULL)
+ find_chasing(source_p, user_host_or_nick)) == NULL)
return 0;
if (IsExemptKline(target_p))