In your "player_team" hook in line 403 you accidentally check "if( team == 0 ...)" instead of 1 for team spectator which prevents spectators to automatically get a light attached to them.
And one error i got:
Code:
L 05/17/2012 - 00:19:36: Info (map "c4m4_milltown_b") (file "errors_20120517.log")
L 05/17/2012 - 00:19:36: [SM] Native "GetClientTeam" reported: Client index 0 is invalid
L 05/17/2012 - 00:19:36: [SM] Displaying call stack trace for plugin "l4d_flashlight.smx":
L 05/17/2012 - 00:19:36: [SM] [0] Line 389, C:\SRCDS\left4dead2\left4dead2\addons\sourcemod\scripting\l4d_flashlight.sp::Event_Spawn()