X-Git-Url: https://jfr.im/git/irc/rqf/shadowircd.git/blobdiff_plain/212380e3f42f585dc1ea927402252eb943f91f7b..07db71cda082d1d7db7bec491bb60aee5f1e2879:/extensions/example_module.c diff --git a/extensions/example_module.c b/extensions/example_module.c index 32e1509..5fcfa17 100644 --- a/extensions/example_module.c +++ b/extensions/example_module.c @@ -16,7 +16,6 @@ * 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 $ */ /* List of ircd includes from ../include/ */ @@ -144,14 +143,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 +161,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 +176,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 +183,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 +198,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 +205,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 +223,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 +241,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; }