layout:

[ ][1]

[3][b][4][c][5][r][7][r][8]

[ ][2][ ][ ][6]

legend:

[ ] = block

[<number>] = command block with corresponding identifier

[b] = redstone block

[c] = comparator, default

[r] = repeater, default

commands:

[1] = /setblock ~ ~-1 ~ redstone_block

[2] = /setblock ~ ~1 ~ air #1 and 2 make up a clock

[3] = /spreadplayers 0 0 100 2000 false @a[x=3000,y=65,z=-3000,r=25,m=0,l=0] #Random spawn command. Actual spawn is 3000 by -3000 in this case, outside of spawn radius, to prevent weird glitches. One is randomly TPd within a 2000 block radius if they are in survival (m=0) and have no XP (l=0).

[4] = /testfor @a[team=] #Activates further circuitry if a brand new player (which would have no team) is detected

[5] = /tellraw @a[team=] ["",{"text":"Insert welcome message here, blah blah.","color":"yellow"}] #Self-explanatory. This is the welcome message; one can add further messages, as we do.

[6] = /tellraw @a[team=mods] ["",{"text":"New player(s) ","color":"gray"},{"selector":"@a[team=]","color":"gray"},{"text":" joined!","color":"gray"}] #This allows the moderators to be notified when a brand new player joins the server.