I got a small problem with a code layout

OK, am trying to reenable a code that was no added the source I have payed for and I have no idear how the code works I think I do that layout of the server funcation worng

on the client when sumone talks it sends this to server

[code]
if Dm.MainClient.Active then
DM.MainClient.Socket.SendText(CodeStr('SetMic'
+ DM.UserName +''
+ RoomName +''
+ GroupName +''
+ 'MicON'
+ DM.UserName +''
+ RoomName +''
+ GroupName +''));
[/code]

Then server gets commands and sends SetMic or if mic in use will send MicON but it dont work is the layout worng?

[code]
//=================================================================
//ooooooooooooooooooooooooooooo SET MIC ooooooooooooooooooooooooooo
//=================================================================

if com = 'SetMic' then
begin
for i := 0 to MainServer.Socket.ActiveConnections - 1 do
begin
if lowercase(MainServer.Socket.Connections[i].Room) = lowercase(dat[1]) then // Gets Room Name
begin
MainServer.Socket.Connections[i].SendText(
CodeStr('SetMic' + dat[0] + '' + dat[1] + ''));
if lowercase(MainServer.Socket.Connections[i].Name) =
lowercase(dat[0]) then
MainServer.Socket.Connections[i].Speak := True;
end
else
if MainServer.Socket.Connections[i].Speak = True then
MainServer.Socket.Connections[i].SendText(
CodeStr('MicON' + dat[0] + '' + dat[1] + ''));
end;
end;
[/code]

Thanks for the help
Slewis
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories