X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/1f9de103c3364b5bd5ee1ce8293d5d168e3dd857..81e41406f4027dfef50dcd5ef33403661bea5995:/extensions/m_identify.c diff --git a/extensions/m_identify.c b/extensions/m_identify.c index 76533c2e..aebcd361 100644 --- a/extensions/m_identify.c +++ b/extensions/m_identify.c @@ -27,15 +27,12 @@ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. - * - * $Id: m_identify.c 2729 2006-11-09 23:52:06Z jilles $ */ #include "stdinc.h" #include "client.h" -#include "common.h" #include "ircd.h" -#include "irc_string.h" +#include "match.h" #include "numeric.h" #include "s_conf.h" #include "logger.h" @@ -44,16 +41,17 @@ #include "msg.h" #include "parse.h" #include "modules.h" +#include "messages.h" #define SVS_chanserv_NICK "ChanServ" #define SVS_nickserv_NICK "NickServ" -char *reconstruct_parv(int parc, const char *parv[]); +static const char identify_desc[] = "Adds the IDENTIFY alias that forwards to NickServ or ChanServ"; -static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); +static void m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]); struct Message identify_msgtab = { - "IDENTIFY", 0, 0, 0, MFLG_SLOW, + "IDENTIFY", 0, 0, 0, 0, {mg_unreg, {m_identify, 0}, mg_ignore, mg_ignore, mg_ignore, {m_identify, 0}} }; @@ -62,22 +60,10 @@ mapi_clist_av1 identify_clist[] = { NULL }; -DECLARE_MODULE_AV1(identify, NULL, NULL, identify_clist, NULL, NULL, "$Revision: 2729 $"); - -char *reconstruct_parv(int parc, const char *parv[]) -{ - static char tmpbuf[BUFSIZE]; int i; - - rb_strlcpy(tmpbuf, parv[0], BUFSIZE); - for (i = 1; i < parc; i++) - { - rb_strlcat(tmpbuf, " ", BUFSIZE); - rb_strlcat(tmpbuf, parv[i], BUFSIZE); - } - return tmpbuf; -} +DECLARE_MODULE_AV2(identify, NULL, NULL, identify_clist, NULL, NULL, NULL, NULL, identify_desc); -static int m_identify(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) +static void +m_identify(struct MsgBuf *msgbuf_p, struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { const char *nick; struct Client *target_p; @@ -85,7 +71,7 @@ static int m_identify(struct Client *client_p, struct Client *source_p, int parc if (parc < 2 || EmptyString(parv[1])) { sendto_one(source_p, form_str(ERR_NOTEXTTOSEND), me.name, source_p->name); - return 0; + return; } nick = parv[1][0] == '#' ? SVS_chanserv_NICK : SVS_nickserv_NICK; @@ -97,5 +83,4 @@ static int m_identify(struct Client *client_p, struct Client *source_p, int parc { sendto_one_numeric(source_p, ERR_SERVICESDOWN, form_str(ERR_SERVICESDOWN), nick); } - return 0; }