]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - extensions/example_module.c
Add description for LOCOPS message.
[irc/rqf/shadowircd.git] / extensions / example_module.c
index 32e15097798ca2b936ead37c8c14ee191948a87a..86623296da868df650e231ff4387902061dbc33c 100644 (file)
@@ -16,7 +16,7 @@
  *   along with this program; if not, write to the Free Software
  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- *   $Id: example_module.c 494 2006-01-15 16:08:28Z jilles $
+ *   $Id: example_module.c 3161 2007-01-25 07:23:01Z nenolod $
  */
 
 /* List of ircd includes from ../include/ */
@@ -144,14 +144,13 @@ DECLARE_MODULE_AV1(
                          /* Then the hook function list, if we have one */
                          test_hfnlist,
                          /* And finally the version number of this module. */
-                         "$Revision: 494 $");
+                         "$Revision: 3161 $");
 
 /* Any of the above arguments can be NULL to indicate they aren't used. */
 
 
 /*
  * mr_test
- *      parv[0] = sender prefix
  *      parv[1] = parameter
  */
 
@@ -163,13 +162,11 @@ munreg_test(struct Client *client_p, struct Client *source_p, int parc, const ch
 {
        if(parc < 2)
        {
-               sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent no parameters",
-                          me.name, source_p->name);
+               sendto_one_notice(source_p, ":You are unregistered and sent no parameters");
        }
        else
        {
-               sendto_one(source_p, ":%s NOTICE %s :You are unregistered and sent parameter: %s",
-                          me.name, source_p->name, parv[1]);
+               sendto_one_notice(source_p, ":You are unregistered and sent parameter: %s", parv[1]);
        }
 
        /* illustration of how to call a hook function */
@@ -180,7 +177,6 @@ munreg_test(struct Client *client_p, struct Client *source_p, int parc, const ch
 
 /*
  * mclient_test
- *      parv[0] = sender prefix
  *      parv[1] = parameter
  */
 static int
@@ -188,14 +184,11 @@ mclient_test(struct Client *client_p, struct Client *source_p, int parc, const c
 {
        if(parc < 2)
        {
-               sendto_one(source_p, ":%s NOTICE %s :You are a normal user, and sent no parameters",
-                          me.name, source_p->name);
+               sendto_one_notice(source_p, ":You are a normal user, and sent no parameters");
        }
        else
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :You are a normal user, and send parameters: %s", me.name,
-                          source_p->name, parv[1]);
+               sendto_one_notice(source_p, ":You are a normal user, and send parameters: %s", parv[1]);
        }
 
        /* illustration of how to call a hook function */
@@ -206,7 +199,6 @@ mclient_test(struct Client *client_p, struct Client *source_p, int parc, const c
 
 /*
  * mrclient_test
- *      parv[0] = sender prefix
  *      parv[1] = parameter
  */
 static int
@@ -214,22 +206,17 @@ mrclient_test(struct Client *client_p, struct Client *source_p, int parc, const
 {
        if(parc < 2)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :You are a remote client, and sent no parameters",
-                          me.name, source_p->name);
+               sendto_one_notice(source_p, ":You are a remote client, and sent no parameters");
        }
        else
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :You are a remote client, and sent parameters: %s",
-                          me.name, source_p->name, parv[1]);
+               sendto_one_notice(source_p, ":You are a remote client, and sent parameters: %s", parv[1]);
        }
        return 0;
 }
 
 /*
  * mserver_test
- *      parv[0] = sender prefix
  *      parv[1] = parameter
  */
 static int
@@ -237,22 +224,17 @@ mserver_test(struct Client *client_p, struct Client *source_p, int parc, const c
 {
        if(parc < 2)
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :You are a server, and sent no parameters",
-                          me.name, source_p->name);
+               sendto_one_notice(source_p, ":You are a server, and sent no parameters");
        }
        else
        {
-               sendto_one(source_p,
-                          ":%s NOTICE %s :You are a server, and sent parameters: %s",
-                          me.name, source_p->name, parv[1]);
+               sendto_one_notice(source_p, ":You are a server, and sent parameters: %s", parv[1]);
        }
        return 0;
 }
 
 /*
  * moper_test
- *      parv[0] = sender prefix
  *      parv[1] = parameter
  */
 static int
@@ -260,13 +242,11 @@ moper_test(struct Client *client_p, struct Client *source_p, int parc, const cha
 {
        if(parc < 2)
        {
-               sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent no parameters",
-                          me.name, source_p->name);
+               sendto_one_notice(source_p, ":You are an operator, and sent no parameters");
        }
        else
        {
-               sendto_one(source_p, ":%s NOTICE %s :You are an operator, and sent parameters: %s",
-                          me.name, source_p->name, parv[1]);
+               sendto_one_notice(source_p, ":You are an operator, and sent parameters: %s", parv[1]);
        }
        return 0;
 }