[CF-Devel] banish command

crossfire-devel-admin at archives.real-time.com crossfire-devel-admin at archives.real-time.com
Fri Jul 25 01:39:36 CDT 2003


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.



_______________________________________________
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