[sork] Aliases and Vacation

Sébastien CORBEAU scorbeau at improve.fr
Wed Aug 18 07:49:24 PDT 2004


Tommi Sakari Uimonen wrote:
> The vacation.php is attached. (It worked with vacation 1.x, but might 
> have some issues with 2.0)
Thanks very much ! :)

> There is still some faults like the user is not able to see the current 
> vacation message (even when the message is just set, it will display the 
> default)
Like the stable version of vacation.

> if(ereg( "^([a-zA-Z0-9.]+)[:][[:space:]]*([a-zA-Z0-9]+)\n$", $buffer ,$item)) {
Wahoo, it works well :)

> if(strcmp($item[2],$user)==0) {
> 	$name=split("[.]",$item[1]);
> 	foreach($name as $n) {
> 		$n=trim($n,".");
> 		// don't add if the alias is already added
> 		if(!strstr($aliases," -a $n")) { $aliases.= " -a $n";}
> 	}
> }
I don't understand what you do there. For example:
sebastien.corbeau: scorbeau
s.corbeau: scorbeau

"ereg" gives sebastien.corbeau and s.corbeau. It's ok.
But after, we only have "-a sebastien -a s"

what did I forget?

Thanks,

seb


More information about the sork mailing list