]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - src/modules.c
[svn] Backport from early 3.x:
[irc/rqf/shadowircd.git] / src / modules.c
index d03eae11276fbf819c94795a5e7352f639ff82e3..0d0836f69353fbd08fcfbd620fa8f094478b0373 100644 (file)
@@ -21,7 +21,7 @@
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: modules.c 1509 2006-05-28 02:35:58Z nenolod $
+ *  $Id: modules.c 3161 2007-01-25 07:23:01Z nenolod $
  */
 
 #include "stdinc.h"
@@ -365,9 +365,7 @@ mo_modload(struct Client *client_p, struct Client *source_p, int parc, const cha
 
        if(findmodule_byname(m_bn) != -1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is already loaded",
-                          me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is already loaded", m_bn);
                MyFree(m_bn);
                return 0;
        }
@@ -398,26 +396,23 @@ mo_modunload(struct Client *client_p, struct Client *source_p, int parc, const c
 
        if((modindex = findmodule_byname(m_bn)) == -1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
                MyFree(m_bn);
                return 0;
        }
 
        if(modlist[modindex]->core == 1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is a core module and may not be unloaded",
-                          me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is a core module and may not be unloaded", m_bn);
                MyFree(m_bn);
                return 0;
        }
 
        if(unload_one_module(m_bn, 1) == -1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
        }
+
        MyFree(m_bn);
        return 0;
 }
@@ -441,8 +436,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c
 
        if((modindex = findmodule_byname(m_bn)) == -1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
                MyFree(m_bn);
                return 0;
        }
@@ -451,8 +445,7 @@ mo_modreload(struct Client *client_p, struct Client *source_p, int parc, const c
 
        if(unload_one_module(m_bn, 1) == -1)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :Module %s is not loaded", me.name, source_p->name, m_bn);
+               sendto_one_notice(source_p, ":Module %s is not loaded", m_bn);
                MyFree(m_bn);
                return 0;
        }
@@ -521,7 +514,7 @@ mo_modrestart(struct Client *client_p, struct Client *source_p, int parc, const
                return 0;
        }
 
-       sendto_one(source_p, ":%s NOTICE %s :Reloading all modules", me.name, parv[0]);
+       sendto_one_notice(source_p, ":Reloading all modules");
 
        modnum = num_mods;
        while (num_mods)