All pastes #357964 Raw Edit

Something

public text v1 · immutable
·published 2007-02-16 00:28 UTC
rendered paste body
# This one adds a registered users database entry
# For the specified nick and uses the specified mask
# If no mask is specified , a default one is constructed
# Then the "ignore" property is set for the user to 1

if(!$0)
{
	echo $tr("Usage:")
	echo "	  /ignore <nick> [mask]"
	halt
}

# Get the mask

%mask = $1

# no mask specified ? build it

if(!%mask)%mask = $0!*@*

# Now add the user (but do not replace old entries)

reguser.add -f -q $0 %mask

# And finally set the property (use -n so the notify lists will be restarted)

reguser.setproperty $0 ignore 1