[mw-devel] CVS Update at silver.sucs.org: mw

Chris Fry fry at sucs.org
Sun Jul 28 19:37:38 BST 2002


CVSROOT:	/usr/local/src/cvs
Module name:	mw
Changes by:	fry at silver.sucs.org	02/07/28 19:37:38

Modified files:
	src            : Makefile bb.h incoming.c main.c newmain.c 
	                 proto.h script.c script_inst.c talker.c 
	                 talker_privs.c 

Log message:
	Changed the way scripts work slightly, so that they will quite happily run
	off the talker - although output from SAY etc.. are ignored, and WHEREAMI
	always returns "-1" - that sort of thing.
	
	---
	
	Changed checkonoff's to use this ability, so you can receive checkonoff
	codes while on the board (ie, if you leave the talker, you will get your
	own checkonoff code). Normal scripts of course, still cant be run from
	the BBS, and IPC/RPC messages are currently ignored if off the talker.
	
	---
	
	Radically, completely rewrote the entire checkonoff system to give more
	information, and a much more logical code system. Scripts executed using
	this method now recieve certain arguments:
	
	$0 = "CheckOnOff"
	$1 = <code>
	$2 = <method>
	$3 = <is_quiet>
	$4 = <sourceuser>
	$5 = <version>
	
	Where <code> can be one of:
	0 - leave the talker
	1 - enter the talker
	2 - leave the board
	3 - enter the board
	
	This keeps backwards compatibility the same - users can still detect each
	of these settings, although the extra features - such as detecting zods -
	will never occur using this code alone
	
	For each of the <code> values, <method> has several meanings:
	
	for leaving the board (2):
	0 - normal (by user)
	1 - timeout
	2 - connection dropped
	M  3 - get mrodded
	S  4 - get banned
	S  5 - crash / error
	S  6 - deleted
	
	for leaving the talker (0):
	0 - normal (by user)
	Z  1 - zodded
	S  2 - chatmode -c
	3 - straight to shell (!quit etc...)
	
	for joining the board (3):
	0 - normal (by user)
	1 - straight to talker (-autochat)
	
	for joining the talker (1):
	0 - normal (by user)
	U  1 - summoned
	S  2 - chatmode +c
	
	The extra letters in front of the <method> indicate certain privs are
	needed:
	
	M - needs mrod priv to detect
	S - needs SU to detect
	U - needs summon to detect
	Z - needs zod to detect
	
	So, for example, if a user were to log on using "-autochat", two messages
	would be created:
	
	<code=3> <method=1>
	<code=1> <method=0>
	
	These are the main two values that most people will use - along with
	"USER <variable" to get the user that caused the checkonoff message.
	
	Added to these two values, <is_quiet> simply returns:
	0 - user logged on normally
	1 - user logged on with -quiet to supress messages
	
	This allows script writers to only display their own messages if a user
	is logged on quietly if they so wish.
	
	<sourceuser> is more tricky. This is the person that caused the initiation
	of the checkonoff code in the first place. ie, for most messages, it is
	the same as the user the broadcast came from. However, in cases such as
	zod, mrod, or chatmode +/-c alteration, <sourceuser> will be the person
	that performed that operation.
	
	ie, SUPERUSER bans USER
	<code=0> <method=3>
	<code=2> <method=4> <user=USER> <sourceuser=SUPERUSER>
	
	and finally, <version> is mainly for being able to work out which version
	of checkonoff is used. this ranges from "1" to "3" currently, but if you
	wish, you can simply check if any of the arguments is left blank "" and
	work out what needs to be done from there.
	
	---
	
	Added a "force_status" to incoming.c, and moved the 'ban' and 'delete'
	detection code to there instead of in the main loop - necessary for the
	new checkonoff information.
	
	---
	
	Fixed a bug with 'ExecEvent2' where it only accepted up to 3 arguments
	
	---
	
	Removed the now-obsolete "zodded" script
	
	Chris




More information about the mw-devel mailing list