Commit Graph

67 Commits

Author SHA1 Message Date
Adam Olsen 0785610296 - fix a little mistake in SV_PrintToClient that'd cause it to
segfault if your first call was with "".  Probably could cause
  crashes too
- add a string.c file to libQFutil, with a Q_strcasestr function,
  which strcasestr is defined to if it's not already defined.  (we'd
  get that with glibc if we defined __USE_GNU, but we don't)
- make client_t and SV_ExtractFromUserinfo both use NAME_MAX for
  their name arrays, instead of 32 for one and 80 for the other
- rewrite almost all of SV_ExtractFromUserinfo's name handling.
  - \r, \n, and \t are all converted to spaces
  - leading/trailing spaces are stripped
  - consecutive spaces are reduced to a single space
  - empty names are considered bad
  - user-* nicks are considered bad (unless forced to them)
  - a name containing console or admin is considered bad
  - a name that already exists is considered bad
  - if they have a bad name it gets forced to user-%d, where %d is
    their userid
  - netname in the progs is now updated properly
  - name changes are always reported unless it's the initial setting,
    rather than only if they're full connected and not a spectator
  - finally, if the name change fails (info string exceeded), give
    them the boot.  (before this was only done for duplicate names)

That's about it :)
2001-10-04 19:11:39 +00:00
Bill Currie b1f4a778f9 the rcsid commit from hell }:> 2001-09-28 06:26:31 +00:00
Bill Currie 06da30ac89 mingw build fixes again (including mostly working in sid: got some link issues) 2001-09-25 06:18:30 +00:00
Bill Currie 36de3c147e move Sys_Quit and Sys_Error totally into libQFutil. They will call a list
of pre-registered (Sys_RegisterShutdown) function before actually exiting
the program. This should take care of the pain when an ncurses server
crashes.
2001-09-24 21:00:23 +00:00
Bill Currie 0425afb190 'rcon localinfo motd "hi there"' now works 2001-09-22 02:24:46 +00:00
Bill Currie 49a85718f8 total nukage of Con_*Printf calls from libs (except for video). Sys_*Printf
(Sys_DPrintf is new) is now used exclusively for all lib printing. Con_Init
sets the sys printf recirection to Con_Print (which has been revamped
appropriatly) and the server sets it to SV_Print (which was SV_Printf and
the new SV_Printf calls /it/). This should fix the rcon print redirection
issues.
2001-09-21 04:22:46 +00:00
Bill Currie 4416404982 total nukage of Sys_Printf calls in the client and server source. this paves
the way for libQFutil using Sys_Printf exlusively.
2001-09-21 03:01:14 +00:00
Adam Olsen bff5a4b4b4 make "Client foo connected" be a normal print instead of a dprint, and
make both that and spectator prints include the ip.
2001-09-20 19:50:24 +00:00
Adam Olsen ca51e3be02 - cleanup of up/down key handling, as per suggestions from james
- add a sv_console_plugin cvar (guess what it does)
2001-09-20 15:14:44 +00:00
Adam Olsen 0977b555f3 - build fix for without curses (untested, but should fix the problem I
had when I last tried)
- fix sv_filter_automask so it's not inverted (doh, again!)
- cleanups of ip filter prints
2001-09-20 06:51:25 +00:00
Adam Olsen 780cc26b37 - add a sv_filter_automask cvar to automatically get /16 for 1.2.0.0
- update writeip to include filter types.  It makes them all permanent
  though, since addip can't take an absolute expiration time :/
2001-09-19 12:58:02 +00:00
Adam Olsen 8f4d39002c - add support for ipv4 embedded in ipv6 addresses. filtering should
now be fully functional for ipv6.  I really oughta test ipv6 sooner
  or later ;)
2001-09-17 07:31:15 +00:00
Adam Olsen d77fcc8695 - fix /0 and /9 masks to not give an error
- consolidate some duplicate code into SV_PrintIP, which returns a
  readable ip address allocated from a static buffer
- remove some debugging prints (addip is now silent on success)
2001-09-17 06:10:39 +00:00
Adam Olsen de716f07e7 - fix an off by one error with implicit masks
- don't attempt to ban/mute/cuff non-existant clients :)
2001-09-17 05:41:17 +00:00
Adam Olsen dcbc9ada26 - rework the parser to regain support for 1.2 ips. No longer uses
inet_pton for ipv4.

These are untested (other than compiling), as I've got issues with the
console I need to sort out.
2001-09-17 05:08:13 +00:00
Adam Olsen f90fcf855e Massive cleanups of ip filtering
- addip now supports a ban time, and a ban/cuff/mute paramter
- addresses now can have /8 for the mask, instead of it being implicit
- removes support for 1.2 which meant 1.2.0.0/16.  use 1.2.0.0/16 or
  1.2.0.0 (implies a /16)
- ipv6 should mostly be supported, but there's a few places that
  aren't finished.  currently gives a compile error

(it WAS working, but now I cvs up'd and I gotta wait for a long test
build.  I don't feel like waiting any longer)
2001-09-16 15:40:21 +00:00
Bill Currie aade80a8d7 /finally/, libQFconsole is being used (qw-server only so far). Still has
some minor nits with ncurses and probably has some isues without ncurses
(quit didn't seem to work when I tried).
2001-09-16 05:41:28 +00:00
Bill Currie e27878e156 bring forward the sv_extentions and stdver changes from 0.3 2001-09-11 03:50:24 +00:00
Bill Currie 74e9f89e8c forward port the client info string filtering from 0.3 and remove info.h from
a couple of c files that no longer need it.
2001-09-11 03:10:29 +00:00
Bill Currie 882adf295a implement KK's ban, mute and cuff 2001-09-09 04:51:08 +00:00
Ragnvald Maartmann-Moe IV f4fd3178f4 More header and whitespace horror reduction. 2001-08-28 02:43:24 +00:00
Bill Currie 330044ec72 don't need sv_misc anymore 2001-08-27 22:36:28 +00:00
Adam Olsen 770fecd4bc Replace sv_gc with pr_gc and pr_gc_interval. pr_gc has 0 for off, 1
for on, and 2 for auto (on for newer progs, off otherwise).
2001-08-20 21:06:25 +00:00
Bill Currie fb42199637 change all the SVFIELD calls to SVtype. this should make the code a little
easier to read.
2001-08-08 20:28:53 +00:00
Adam Olsen 513347effd Fix that classic "playing without joining a team" TF cheat :) 2001-08-01 00:38:16 +00:00
Bill Currie fb26d8b18a make Info_Set* take flags indicating wether funchars should be stripped or not 2001-07-31 18:27:49 +00:00
Adam Olsen 2f223924f4 Add a set of "crudefile" file io functions. Reads or writes an
entire C string (including terminating nul).  Read the source for
more details :)
2001-07-22 19:03:26 +00:00
Bill Currie 159bc6147c create an "input line" object for the console so Con_ProcessInput can be used
in verious contexts
2001-07-17 16:46:51 +00:00
Bill Currie 104701a8c5 the beginnings of the console lib (using plugins for the client/server type
consoles). Currently, doesn't affect anybody other than the need to
re-bootstrap.
2001-07-16 20:41:10 +00:00
Bill Currie 1c9e1b176f fear the mighty const correct patch 2001-07-15 07:04:17 +00:00
Bill Currie 7a06a2254a rename the Con_Printf in sv_send.c to SV_Printf and change all the calls to
Con_Printf in the server code to SV_Printf.
nuke Con_DPrintf from sv_send.c
2001-07-11 23:11:29 +00:00
Bill Currie eb66aa03ee sv_console.c:
/finally/, the input line works to my satisfaction
sv_main.c:
	call Con_ProcessInput to get the cursor in the right position on the
	screen (yeah, horrible kludge until someone figures out a nice console
	api)
2001-07-11 03:11:53 +00:00
Bill Currie f9f31ad4b3 ncurses console for the server. input handling is currently a nasty bit of
code duplication, but it seems to work nicely (except for cursor movement
keys) and even gives tab completion to the server :)
2001-07-10 22:36:22 +00:00
Bill Currie 001f178e86 rcon and say improvements from kkqwsv
server.h:
	add rcon_from_user
sv_ccmds.c:
	add SV_ConSay_Info_f (sayinfo) for quiet info messages and revamp the
	rest of SV_ConSay_f accordingly. Also include deactivated commands for
	cuff, mute, tell and ban (coming soon).
sv_main.c:
	revamp the rcon system to support both `root' rcon and admin rcon and
	provide better logging. admin_password is the cvar holding the password
	for admin access (used the same way as rcon_password)
2001-07-09 23:33:35 +00:00
Adam Olsen 0bb5db78af Add a sv_gc cvar, which makes it run the string gc every n frames.
Defaults to 0 (disabled).
2001-06-16 22:39:41 +00:00
Bill Currie d2a4faae6e oops :) (packet log fixes: segs aren't nice) 2001-05-31 15:38:08 +00:00
Bill Currie 323015b11a include/QF header cleanup. including config.h (or any file from include) is
a nono because headers in include/QF get installed, but include don't and thus
would break quakeforge-dev.
2001-05-31 05:33:13 +00:00
Bill Currie 6bf58ab1af no header includes cvar.h now 2001-05-31 03:41:35 +00:00
Joseph Carter 05adfd0e53 quakefs.h -> vfs.h
quakeio.h -> vfile.h

More diff reduction between trunk and my VFS code.  Also took the time to
put some headers in order and fix a few #include's pointed out by moving
things around a bit.
2001-05-30 04:34:06 +00:00
Joseph Carter 186d577818 s/QFile/VFile/g - makes my diffs much smaller and more manageable for the
VFS work.
2001-05-30 03:21:19 +00:00
Bill Currie 3c66182588 fix the sound precache lookup code in net_packetlog.c 2001-05-28 22:16:27 +00:00
Zephaniah E. Hull e65c1bd7e1 Make sure the message gets to the client. 2001-05-22 13:40:21 +00:00
Zephaniah E. Hull 98a8db2f0e Coderjoe's fix from newtree. (The other part of the DOS fix.)
Prevent an infinite loop in a fairly rare case, where the infostring is
too full to accept a new name when there is a duplicate name.
2001-05-22 13:30:35 +00:00
Zephaniah E. Hull 5245f56012 Validate userinfo strings on connect. (Part of a nasty DOS fix.) 2001-05-22 12:00:45 +00:00
Bill Currie d62ac62ff5 allow commands other than set to be executed from ~/.quakeforgerc 2001-05-17 21:32:59 +00:00
Bill Currie 1fbb62d518 hook in the plugin system 2001-04-25 00:20:23 +00:00
Bill Currie 9babdbdf79 correct the wording of the server init failure message 2001-04-18 04:42:09 +00:00
Joseph Carter 75aa40276f A few more. Also removed a couple inaccurate comments. 2001-04-11 00:10:19 +00:00
Joseph Carter 2bc55b7828 Cvar cleanups.. NULL is now used in place of 0 for callbacks, this should
make Cvar_Get's a lot easier to read.
2001-04-10 23:39:30 +00:00
Bill Currie a96536c896 nuke commdef.h and clean up the results by putting its contents where they
belong.
also, merge model.h and friends (MINUS render.h). this needed moving efrags_t
from render.h to model.h.
2001-04-10 06:55:28 +00:00