]> jfr.im git - irc/rqf/shadowircd.git/blobdiff - modules/m_unreject.c
Allow /ojoin !#channel/%#channel, if admin/halfop are enabled.
[irc/rqf/shadowircd.git] / modules / m_unreject.c
index 094e10d80078936f2f70a6610489d9f5270a3b02..21e136a3785e748c14ed824551b2ca442ac90c12 100644 (file)
@@ -42,28 +42,30 @@ struct Message unreject_msgtab = {
 mapi_clist_av1 unreject_clist[] = { &unreject_msgtab, NULL };
 DECLARE_MODULE_AV1(unreject, NULL, NULL, unreject_clist, NULL, NULL, "$Revision: 3161 $");
 
-/*\r
- * mo_unreject\r
- *\r
- */\r
-static int\r
-mo_unreject(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])\r
-{\r
-       if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_duration == 0)\r
-       {\r
-               sendto_one_notice(source_p, ":Reject cache is disabled");\r
-               return 0;                       \r
-       }\r
-\r
-       if(!parse_netmask(parv[1], NULL, NULL))\r
-       {\r
-               sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]);\r
-               return 0;\r
-       }       \r
-       \r
-       if(remove_reject(parv[1]))\r
-               sendto_one_notice(source_p, ":Removed reject for %s", parv[1]);\r
-       else\r
-               sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]);\r
-       return 0;\r
+/*
+ * mo_unreject
+ *
+ */
+static int
+mo_unreject(struct Client *client_p, struct Client *source_p, int parc, const char *parv[])
+{
+       if(ConfigFileEntry.reject_after_count == 0 || ConfigFileEntry.reject_ban_time == 0 ||
+          ConfigFileEntry.reject_duration == 0)
+       {
+               sendto_one_notice(source_p, ":Reject cache is disabled");
+               return 0;                       
+       }
+
+       if(!parse_netmask(parv[1], NULL, NULL))
+       {
+               sendto_one_notice(source_p, ":Unable to parse netmask %s", parv[1]);
+               return 0;
+       }       
+       
+       if(remove_reject_ip(parv[1]))
+               sendto_one_notice(source_p, ":Removed reject for %s", parv[1]);
+       else
+               sendto_one_notice(source_p, ":Unable to remove reject for %s", parv[1]);
+
+       return 0;
 }