X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..54656d7650e3559c37fc3630bd73b3cbe443f05f:/modules/m_restart.c diff --git a/modules/m_restart.c b/modules/m_restart.c index aac90db..e175e9d 100644 --- a/modules/m_restart.c +++ b/modules/m_restart.c @@ -21,20 +21,19 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA * - * $Id: m_restart.c 254 2005-09-21 23:35:12Z nenolod $ + * $Id: m_restart.c 3161 2007-01-25 07:23:01Z nenolod $ */ #include "stdinc.h" #include "client.h" #include "common.h" -#include "irc_string.h" -#include "sprintf_irc.h" +#include "match.h" #include "ircd.h" #include "numeric.h" #include "s_conf.h" #include "s_newconf.h" #include "restart.h" -#include "s_log.h" +#include "logger.h" #include "send.h" #include "msg.h" #include "parse.h" @@ -48,7 +47,7 @@ struct Message restart_msgtab = { }; mapi_clist_av1 restart_clist[] = { &restart_msgtab, NULL }; -DECLARE_MODULE_AV1(restart, NULL, NULL, restart_clist, NULL, NULL, "$Revision: 254 $"); +DECLARE_MODULE_AV1(restart, NULL, NULL, restart_clist, NULL, NULL, "$Revision: 3161 $"); /* * mo_restart @@ -58,7 +57,7 @@ static int mo_restart(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { char buf[BUFSIZE]; - dlink_node *ptr; + rb_dlink_node *ptr; struct Client *target_p; if(!IsOperDie(source_p)) @@ -70,27 +69,23 @@ mo_restart(struct Client *client_p, struct Client *source_p, int parc, const cha if(parc < 2 || EmptyString(parv[1])) { - sendto_one(source_p, ":%s NOTICE %s :Need server name /restart %s", - me.name, source_p->name, me.name); + sendto_one_notice(source_p, ":Need server name /restart %s", me.name); return 0; } else if(irccmp(parv[1], me.name)) { - sendto_one(source_p, ":%s NOTICE %s :Mismatch on /restart %s", - me.name, source_p->name, me.name); + sendto_one_notice(source_p, ":Mismatch on /restart %s", me.name); return 0; } - DLINK_FOREACH(ptr, lclient_list.head) + RB_DLINK_FOREACH(ptr, lclient_list.head) { target_p = ptr->data; - sendto_one(target_p, - ":%s NOTICE %s :Server Restarting. %s", - me.name, target_p->name, get_client_name(source_p, HIDE_IP)); + sendto_one_notice(target_p, ":Server Restarting. %s", get_client_name(source_p, HIDE_IP)); } - DLINK_FOREACH(ptr, serv_list.head) + RB_DLINK_FOREACH(ptr, serv_list.head) { target_p = ptr->data; @@ -98,7 +93,7 @@ mo_restart(struct Client *client_p, struct Client *source_p, int parc, const cha me.name, get_client_name(source_p, HIDE_IP)); } - ircsprintf(buf, "Server RESTART by %s", get_client_name(source_p, HIDE_IP)); + rb_sprintf(buf, "Server RESTART by %s", get_client_name(source_p, HIDE_IP)); restart(buf); return 0;