fix bug 183

This commit is contained in:
Mark 2004-09-09 19:50:57 +00:00
parent 9ffd320a98
commit 802f4a1609
4 changed files with 15 additions and 1 deletions

View file

@ -1,6 +1,7 @@
SecureServ Module for NeoStats Changelog.
==============================================================================
1.3 - Fish (F) and Mark (M) - 27 Aug, 2004
- Fix bug 183 - secureserv echoing messages for other module bots. (M)
- Fix bug 190 - wrong message displayed for chan message off. (M)
- Fix bug 176 - monchans and excludes (M)
- Ported to core command processor (M)

View file

@ -59,7 +59,7 @@ static int chkmonchan (const void *key1, const void *key2)
return (strcasecmp(chan, chk));
}
static int is_monchan(char* chan)
int is_monchan(char* chan)
{
if (list_find(monchans, chan, chkmonchan)) {
return(1);

View file

@ -763,6 +763,11 @@ static int event_cprivate(char **av, int ac)
return -1;
}
/* Not an onjoin bot channel */
if (strcasecmp(av[1], SecureServ.lastchan) !=0 && !is_monchan(av[1])) {
return -1;
}
u = finduser(av[0]);
if (!u) {
return -1;
@ -788,6 +793,11 @@ static int event_cnotice(char **av, int ac)
return -1;
}
/* Not an onjoin bot channel */
if (strcasecmp(av[1], SecureServ.lastchan) !=0 && !is_monchan(av[1])) {
return -1;
}
u = finduser(av[0]);
if(!u) {
return -1;

View file

@ -286,6 +286,9 @@ extern const char *ts_help_set_onjoinbotmodes[];
extern char onjoinbot_modes[MODESIZE];
int is_monchan(char* chan);
/* these are needed for 2.5.14 compatibility */
#ifndef EVENT_SERVER
#define EVENT_SERVER EVENT_NEWSERVER