diff options
author | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-31 20:54:28 +0000 |
---|---|---|
committer | michael <michael@82007160-df01-0410-b94d-b575c5fd34c7> | 2013-05-31 20:54:28 +0000 |
commit | 7dd1e4c01142f8e20606218e69d37bb3f33806c8 (patch) | |
tree | b358dd65a9dcc4b6fbfff8e08d78b1bddf07ab60 /modules | |
parent | e0b160d6a3bbe88509802d5b67537badc736e2e1 (diff) |
- Cleanup flattened links code
git-svn-id: svn://svn.ircd-hybrid.org/svnroot/ircd-hybrid/branches/8.1.x@2157 82007160-df01-0410-b94d-b575c5fd34c7
Diffstat (limited to 'modules')
-rw-r--r-- | modules/m_links.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/m_links.c b/modules/m_links.c index 7970097..e0fe286 100644 --- a/modules/m_links.c +++ b/modules/m_links.c @@ -38,6 +38,8 @@ static void do_links(struct Client *source_p, int parc, char *parv[]) { + dlink_node *ptr = NULL; + sendto_realops_flags(UMODE_SPY, L_ALL, SEND_NOTICE, "LINKS requested by %s (%s@%s) [%s]", source_p->name, @@ -48,7 +50,6 @@ do_links(struct Client *source_p, int parc, char *parv[]) { const char *mask = (parc > 2 ? parv[2] : parv[1]); const char *me_name, *nick; - dlink_node *ptr; me_name = ID_or_name(&me, source_p->from); nick = ID_or_name(source_p, source_p->from); @@ -93,7 +94,12 @@ do_links(struct Client *source_p, int parc, char *parv[]) ID_or_name(&me, source_p->from), ID_or_name(source_p, source_p->from), me.name, me.name, 0, me.info); - send_message_file(source_p, &ConfigFileEntry.linksfile); + + DLINK_FOREACH(ptr, flatten_links.head) + sendto_one(source_p, ":%s %d %s %s", + ID_or_name(&me, source_p->from), RPL_LINKS, + ID_or_name(source_p, source_p->from), + ptr->data); sendto_one(source_p, form_str(RPL_ENDOFLINKS), ID_or_name(&me, source_p->from), ID_or_name(source_p, source_p->from), "*"); |