If someone is willing and has the time, could they serjest a module that will allow the netadmin of the server to set notices to be sent to clients upon connecting to the server. I know the service 'Global' could be use. But i was thinking more along the lines of the actually server sending the notices. I know some ircd's already support this, has there been any plans to incorperate this into the ircd its self?
Thanks
[Request] 'On Connect' notice's
-
- Posts: 28
- Joined: Thu Jun 22, 2006 1:09 am
- Location: UK
[Request] 'On Connect' notice's
Whats a help Channel without a n00b!
-
- Posts: 267
- Joined: Tue Jan 18, 2005 3:24 pm
- Location: Scotland - United Kingdom
-
- Posts: 28
- Joined: Thu Jun 22, 2006 1:09 am
- Location: UK
Reply: Jobe1986, White_Magic
I'm using the smotd currently, thanksYou could use the MOTD or Short MOTD and put the notices at the bottom of it so they're the last thing the user see's afetr connecting.
I'll give you an example, taken from an other IRCD.u dont need a module for this? restrict the snomasks for +s +cF and then make sure the opers set it into there oper blocks.
Code: Select all
-X-Server.org- *** Notice -- This server runs an open proxy monitor to prevent abuse.
-X-Server.org- *** Notice -- If you see connections on various ports from ***
-X-Server.org- *** Notice -- please disregard them, as they are the monitor in action.
-X-Server.org- *** Notice -- For more information please visit ***
Whats a help Channel without a n00b!
My module, edited from defizzer(example module, (C) Carsten V. Munk 2003 <stskeeps at tspre.org>)
This is the only module, that sent notice BEFORE scanning, so, users has (minimal) chance to disconnect before scanning ;)
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
DLLFUNC int bopm_notice(aClient *sptr);
static Hook *LocConnect = NULL;
ModuleInfo BOPMModInfo;
ModuleHeader MOD_HEADER(bopm_noticer)
= {
"On-Connect notice", /* Name of module */
"$Id: bopm_notice.c,v 1.0.0.0 2006/03/14 19:01:16 CS-Help Exp $", /* Version */
"Warn about Proxy scanning", /* Short description of module */
"3.2-b8-1",
NULL
};
DLLFUNC int MOD_INIT(bopm_noticer)(ModuleInfo *modinfo)
{
bcopy(modinfo,&BOPMModInfo,modinfo->size);
LocConnect = HookAddEx(BOPMModInfo.handle, HOOKTYPE_PRE_LOCAL_CONNECT, bopm_notice);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(bopm_noticer)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(bopm_noticer)(int module_unload)
{
HookDel(LocConnect);
return MOD_SUCCESS;
}
DLLFUNC int bopm_notice(aClient *sptr)
{
sendto_one(sptr, ":%s NOTICE %s : ", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s :\2YOUR PORTS MAY BE SCANNED AGAINST PROXIES\2", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s :\2IF THIS VIOLATES SOME RULES - DISCONNECT NOW!\2", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s : ", me.name, sptr);
return 0;
}
This is the only module, that sent notice BEFORE scanning, so, users has (minimal) chance to disconnect before scanning ;)
#include "config.h"
#include "struct.h"
#include "common.h"
#include "sys.h"
#include "numeric.h"
#include "msg.h"
#include "channel.h"
#include <time.h>
#include <sys/stat.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _WIN32
#include <io.h>
#endif
#include <fcntl.h>
#include "h.h"
#ifdef STRIPBADWORDS
#include "badwords.h"
#endif
#ifdef _WIN32
#include "version.h"
#endif
DLLFUNC int bopm_notice(aClient *sptr);
static Hook *LocConnect = NULL;
ModuleInfo BOPMModInfo;
ModuleHeader MOD_HEADER(bopm_noticer)
= {
"On-Connect notice", /* Name of module */
"$Id: bopm_notice.c,v 1.0.0.0 2006/03/14 19:01:16 CS-Help Exp $", /* Version */
"Warn about Proxy scanning", /* Short description of module */
"3.2-b8-1",
NULL
};
DLLFUNC int MOD_INIT(bopm_noticer)(ModuleInfo *modinfo)
{
bcopy(modinfo,&BOPMModInfo,modinfo->size);
LocConnect = HookAddEx(BOPMModInfo.handle, HOOKTYPE_PRE_LOCAL_CONNECT, bopm_notice);
return MOD_SUCCESS;
}
DLLFUNC int MOD_LOAD(bopm_noticer)(int module_load)
{
return MOD_SUCCESS;
}
DLLFUNC int MOD_UNLOAD(bopm_noticer)(int module_unload)
{
HookDel(LocConnect);
return MOD_SUCCESS;
}
DLLFUNC int bopm_notice(aClient *sptr)
{
sendto_one(sptr, ":%s NOTICE %s : ", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s :\2YOUR PORTS MAY BE SCANNED AGAINST PROXIES\2", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s :\2IF THIS VIOLATES SOME RULES - DISCONNECT NOW!\2", me.name, sptr);
sendto_one(sptr, ":%s NOTICE %s : ", me.name, sptr);
return 0;
}