[DGD] Kernel Mudlib
Shevek
shevek at btinternet.com
Sun Feb 17 04:57:15 CET 2002
At 09:08 16/02/02 -0800, you wrote:
>On Fri, 15 February 2002, Erwin Harte wrote:
> >
> > Return MODE_DISCONNECT or whatever it's called as the very first thing
> > in that special user-object, then the connection will be closed almost
> > immediately.
> >
>
>OK thanks. I think I might be doing that as soon as login() is called on
>the user object. I was just wondering if there was some way of disabling
>the telnet port without a special user-object.
Set the timeout in telnetd or binaryd (Or whatever you pass via initd.c) to
-1, effectively this disconnects as soon as they connect. No need to pass
any object back as it's never used.
It's good to be nice about it and leave query_banner giving some
explanation as to why they can't logon on the telnet/binary port.
Eg
object select(string str) {
/* No need to return anything, but you need the function I think */
}
int query_timeout(object connection){
/* Disconnect immediately */
return(-1);
}
string query_banner(object connection) {
/* Needed, it gets called before query_timeout */
string str;
str="\nTelnet connections are not permitted.";
str+="\nUse port 6048 \n";
return(str);
}
Shevek
_________________________________________________________________
List config page: http://list.imaginary.com/mailman/listinfo/dgd
More information about the DGD
mailing list