Metropoli BBS
VIEWER: mabr.pps MODE: TEXT (ASCII)
;Simple Broadcaster 0.1  Max 20 nodes
;Moon Angel Productions
print "@CLS@@POFF@"

integer r
integer mnum
integer i
string a
mnum=maxnode()
if (mnum>20) then mnum=20
endif

:screen
for i=1 to maxnode()
ansipos 1,i+2
println "@X30                                                                          "
next
ansipos 2,1
println "@X1F Node #"
ansipos 10,1
println "@X1FNode User"
ansipos 30,1
println "@X1FCity of User"
ansipos 55,1
println "@X1FUser Status"
ansipos 1,2
println "@X1F=========================================================================="
for i=1 to maxnode()
rdunet i
if (un_name()="") then
ansipos 2,i+2
print "@X30Node "
print i
ansipos 10,i+2
println "@X4F...waiting for call"
endif
if (un_name()<>"") then
ansipos 2,i+2
print "@X30Node "
print i
ansipos 10,i+2
print lower(un_name())
ansipos 30,i+2
print lower(un_city())
ansipos 55,i+2
if (un_stat()="U") then goto temp
endif
if (un_stat()="A") then
:temp
println "@X30ready for broadcast"
endif
if (un_stat()="T") then
println "@X30transferring a file"
endif
endif
next
ansipos 1,mnum+3
println "@X1F=@X1AMA Simple Broadcasting PPE v0.0a written by Ryan Yu@X1F======================"
r=0
input "Broadcast to [#] node number or [99] ALL available nodes",r
println
if (r=0) then goto exit
end if
if (r=99) then
r=0
goto loop
end if
if (r>maxnode()) then
println "@X4FError: That node does not exist!"
goto screen
end if
if (r=pcbnode()) then
println "@X4FError: Are you crazy?!"
goto screen
end if
rdunet r
if (un_name()="") then goto tema
end if

:loop
a=""
println "@X30Use [@X1BENTER@X30] by itself to quit back to PcBoard!"
if (r>0) then
print "@X2ETarget Node "
print r
endif
if (r=0) then
print "@X2ETarget All Nodes"
endif
inputtext " Broadcast=",a,@X0E,60
if (a="") then goto exit
endif
println
rdunet pcbnode()
a="msg from "+un_name()+" on node "+string(pcbnode())+" : "+a
if (r>0) then
rdunet r
if (un_name()="") then
goto tema
endif
if (un_stat()="T") then
:tema
println "@X4FThe node you are trying to reach is currently unavailable for broadcast."
goto exit
end if
broadcast r,r,a
goto loop
end if
for i=1 to maxnode()
if (i<>pcbnode()) then
rdunet i
if (un_stat()<>"T") then
broadcast i,i,a
endif
endif
next
goto loop

:exit
println
println "@X0AMoon Angel Simple Broadcasting PPE @X0F0.0a"
println "@X0EIts Free, no cripples, and no more stupid registration charges."
println "@MORE@"
end
[ RETURN TO DIRECTORY ]