[CF-Devel] banish command

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Jul 25 05:16:52 CDT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le Vendredi 25 Juillet 2003 08:39, Mark Wedel a écrit :
>
     
      Todd Mitchell wrote:
     
     >
     
      > OK, so I wrote a command so that DM's can banish players which is
     
     >
     
      > basically kicking them off the server and putting their IP into the
     
     >
     
      > ban_file.
     
     >
     
     
     >
     
        <much snipped>
     
     >
     
     
     >
     
        One problem the code as written (or other code as written) is that the
     
     >
     
      ban_file doesn't sit in the /var tree, but instead /etc (these are really
     
     >
     
      derived from configure directories - I think /etc is considered the
     
     >
     
      configuration duration, and /var is the dynamic directory).  This may be an
     
     >
     
      issue in that I believe that files in /etc (and /share) are not required to
     
     >
     
      be writable by a running server.  This may not actually be an issue for any
     
     >
     
      server that actually runs, but if the ban_file is writable from a running
     
     >
     
      server, it should probably get moved into the var tree.
     
     >
     
     
     >
     
        As for killing off a socket, just set pl->socket->status = Ns_Dead (might
     
     >
     
      not have all the variable names set right there, but that should be a good
     
     >
     
      approximation).
     
     >
     
     
     >
     
        The socket code will see the socket is marked dead, and do appropriate
     
     >
     
      cleanup (disconnect, save player, etc).  The actual socket code doesn't
     
     >
     
      really care why the socket is now dead - Ns_Dead can also be set if the
     
     >
     
      socket falsl too far behind in processing information from the server.
     
     >
     
     
     >
     
     
     

I think the ban file in /etc should be a permanent ban file used for problems
like crossfire hacking attempt and so on. This sohuld contain only ip we
really would NEVER want again in crossfire.
The bans used in crossfire as dm should be able to be on a temporal bassi
(like for 24 hours), this would prevent a ban file containing a complete
listing of ips from a specific user's ISP, which would prevent other users
from this ISP to connect (do not underestimate a kid wanting to bring
problems). To do this an additionnal file in /var which would be maintained
in crossfire and updated from time to time to delete old enties could be
usefull. This may be easily done my maintaining those in memory, read the
file only at server lunch (eg after a crash) and to writte to it only when
the list in memory has changed. What do you think about this? (a bit more
complex but also more flexible)

Perhaps a 'remove character' command could be usefull but i would find it more
funny to send the player in jail with a no_shout call too :)


Concerning the problem of kick command, i think simply closing the associated
socket should be enough, since this would force client to reconnect.

>
     
     
     >
     
      _______________________________________________
     
     >
     
      crossfire-devel mailing list
     
     >
     
     
      crossfire-devel at lists.real-time.com
      
      
     >
     
     
      https://mailman.real-time.com/mailman/listinfo/crossfire-devel
      
      
     -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/IQOZHHGOa1Q2wXwRAs3mAKDX6jtEPN1Y5yNKy/Yn4zdGW0AnOgCfTQCJ
PD040TrJuauO0jB7R4hNIyU=
=ranb
-----END PGP SIGNATURE-----


_______________________________________________
crossfire-devel mailing list
     
     crossfire-devel at lists.real-time.com
     
     
     https://mailman.real-time.com/mailman/listinfo/crossfire-devel
     
     
    


More information about the crossfire mailing list