Page 1 of 1
[Request] 'On Connect' notice's
Posted: Sat Aug 19, 2006 4:22 pm
by HelpChanneln00b
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

Posted: Sat Aug 19, 2006 5:11 pm
by Jobe
You 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.
Posted: Sat Aug 19, 2006 5:11 pm
by White_Magic
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.
Reply: Jobe1986, White_Magic
Posted: Thu Aug 24, 2006 10:56 pm
by HelpChanneln00b
You 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'm using the smotd currently, thanks
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.
I'll give you an example, taken from an other IRCD.
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 ***
X-Server.org is the actuall server that is sending these notices on connect, i've changed the name btw

Posted: Fri Aug 25, 2006 6:48 pm
by JanisB
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;
}