remove function

This commit is contained in:
fishwaldo 2003-02-14 13:13:56 +00:00
parent e56df1f497
commit 585c4745d4
3 changed files with 28 additions and 4 deletions

View file

@ -4,6 +4,7 @@ Open Proxy Scanning Bot Module for NeoStats Changelog.
- Fix a coredump when not enough paramaters supplied to the set command
- OPSB checks the excluded server list when a nick joins on straight away, instead of waiting for the DNS lookups to finish :)
- Changed some of the levels to 40 (localoper) so localops can use opsb to check sites/users
- added REMOVE function to help remove akills set by OPSB
- Bah, really fixed set to not work at all!
- Added some stats on cachehits and opm hits

19
opsb.c
View file

@ -18,7 +18,7 @@
** USA
**
** NeoStats CVS Identification
** $Id: opsb.c,v 1.13 2003/01/30 11:29:25 fishwaldo Exp $
** $Id: opsb.c,v 1.14 2003/02/14 13:13:56 fishwaldo Exp $
*/
@ -56,7 +56,7 @@ extern const char *opsb_help_check[];
extern const char *opsb_help_status[];
extern const char *opsb_help_set[];
extern const char *opsb_help_exclude[];
extern const char *opsb_help_remove[];
int online;
Module_Info my_info[] = { {
@ -121,6 +121,8 @@ int __Bot_Message(char *origin, char **argv, int argc)
privmsg_list(u->nick, s_opsb, opsb_help_set);
} else if ((!strcasecmp(argv[2], "exclude") && UserLevel(u) > 100)) {
privmsg_list(u->nick, s_opsb, opsb_help_exclude);
} else if ((!strcasecmp(argv[2], "remove") && UserLevel(u) > 40)) {
privmsg_list(u->nick, s_opsb, opsb_help_remove);
} else {
prefmsg(u->nick, s_opsb, "Invalid Syntax. /msg %s help for more info", s_opsb);
}
@ -186,6 +188,19 @@ int __Bot_Message(char *origin, char **argv, int argc)
}
lnode = lnode_create(scandata);
list_append(opsbl, lnode);
} else if (!strcasecmp(argv[1], "remove")) {
if (UserLevel(u) < 40) {
prefmsg(u->nick, s_opsb, "Access Denied");
chanalert(s_opsb, "%s tried to use remove, but does not have access", u->nick);
return 0;
}
if (argc < 3) {
prefmsg(u->nick, s_opsb, "Invalid Syntax. /msg %s help remove for more info", s_opsb);
return 0;
}
srakill_cmd(argv[2], "*");
chanalert(s_opsb, "%s attempted to remove a akill for *@%s", u->nick, argv[2]);
return 1;
} else if (!strcasecmp(argv[1], "check")) {
if (UserLevel(u) < 40) {
prefmsg(u->nick, s_opsb, "Access Denied");

View file

@ -18,7 +18,7 @@
** USA
**
** NeoStats CVS Identification
** $Id: opsb_help.c,v 1.4 2002/10/24 09:27:58 fishwaldo Exp $
** $Id: opsb_help.c,v 1.5 2003/02/14 13:13:56 fishwaldo Exp $
*/
#include "stats.h"
@ -37,7 +37,7 @@ NULL
const char *opsb_help_oper[] = {
"OPERTATOR COMMANDS:",
" CHECK STATUS SET EXCLUDE",
" CHECK STATUS SET EXCLUDE REMOVE",
"",
NULL
};
@ -139,3 +139,11 @@ const char *opsb_help_exclude[] = {
"",
NULL
};
const char *opsb_help_remove[] = {
"Usage: \2REMOVE <ip/host>\2",
"",
"This command lets you remove akills that might have been set by opsb previously",
"<ip/host> is the hostname as listed in your akill list (usually /stats a)",
"",
NULL
};