[Request] 'On Connect' notice's

These are old archives. They are kept for historic purposes only.
Post Reply
HelpChanneln00b
Posts: 28
Joined: Thu Jun 22, 2006 1:09 am
Location: UK

[Request] 'On Connect' notice's

Post 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 :)
Whats a help Channel without a n00b! :P
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Post 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.
White_Magic
Posts: 267
Joined: Tue Jan 18, 2005 3:24 pm
Location: Scotland - United Kingdom

Post 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.
i spend 4 hrs a day gaming and 14hrs on irc, for 5days a week, im not an addict :D
HelpChanneln00b
Posts: 28
Joined: Thu Jun 22, 2006 1:09 am
Location: UK

Reply: Jobe1986, White_Magic

Post 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 :wink:
Whats a help Channel without a n00b! :P
JanisB
Posts: 128
Joined: Fri Apr 22, 2005 9:05 am
Location: LV
Contact:

Post 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;
}
Post Reply