X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/5a34b193e620cdd8141b79197c37717cdda0a48e..55bb399f79289b68e9d25db15c60463502d4c2dc:/modules/m_help.c diff --git a/modules/m_help.c b/modules/m_help.c index 544b54a..ab94ed0 100644 --- a/modules/m_help.c +++ b/modules/m_help.c @@ -31,7 +31,7 @@ #include "numeric.h" #include "send.h" #include "s_conf.h" -#include "s_log.h" +#include "logger.h" #include "parse.h" #include "modules.h" #include "hash.h" @@ -57,7 +57,6 @@ DECLARE_MODULE_AV1(help, NULL, NULL, help_clist, NULL, NULL, "$Revision: 254 $") /* * m_help - HELP message handler - * parv[0] = sender prefix */ static int m_help(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) @@ -69,7 +68,6 @@ m_help(struct Client *client_p, struct Client *source_p, int parc, const char *p /* * mo_help - HELP message handler - * parv[0] = sender prefix */ static int mo_help(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) @@ -81,7 +79,6 @@ mo_help(struct Client *client_p, struct Client *source_p, int parc, const char * /* * mo_uhelp - HELP message handler * This is used so that opers can view the user help file without deopering - * parv[0] = sender prefix */ static int mo_uhelp(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) @@ -96,11 +93,19 @@ dohelp(struct Client *source_p, int flags, const char *topic) static const char ntopic[] = "index"; struct cachefile *hptr; struct cacheline *lineptr; - dlink_node *ptr; - dlink_node *fptr; + rb_dlink_node *ptr; + rb_dlink_node *fptr; if(EmptyString(topic)) + { topic = ntopic; + if(!EmptyString(ServerInfo.helpchan)) + sendto_one(source_p, ":%s 525 %s :Official Help Channel: %s", + me.name, source_p->name, ServerInfo.helpchan); + if(!EmptyString(ServerInfo.helpurl)) + sendto_one(source_p, ":%s 526 %s :Official Help URL: %s", + me.name, source_p->name, ServerInfo.helpurl); + } hptr = irc_dictionary_retrieve(flags & HELP_OPER ? help_dict_oper : help_dict_user, topic); @@ -118,7 +123,7 @@ dohelp(struct Client *source_p, int flags, const char *topic) sendto_one(source_p, form_str(RPL_HELPSTART), me.name, source_p->name, topic, lineptr->data); - DLINK_FOREACH(ptr, fptr->next) + RB_DLINK_FOREACH(ptr, fptr->next) { lineptr = ptr->data;