auteração mikrontrol hotspot
É isso pessoal é exelente como esta mas resolvi fazer algumas modificações e compatilhar com vocês
como ele é para inclusão de usuários pppoe não atendia a minha necessidade pois eu uso hotspot ,au ives de cadastrar no pppoe que tal no hotspot,mas como todo trabalho open source não é trabalho de apenas uma pessoa e gostaria da contribuição de todos os programadores que quiserem participar.
eu já consegui modificar para a inclusão de usuarios no hotspot mas não consegui bloquear ,colocar o mac nem o ip.se algue peder ajudar com as variaveis
procedure TfrmData.btClientsClick(Sender: TObject);
begin
//ALTERA LOGIN
frmCommunication.IdTelnet1.WriteLn('/');
if frmData.dbLogin.Text<>''then
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user edit [find comment="'+frmData.tblClientsAUTOINC.Text+'"] name='+frmData.dbLogin.Text);
//CADASTRA CLIENTE
frmCommunication.IdTelnet1.WriteLn('/');
if frmData.dbAutoInc.Text<>''then
begin
frmCommunication.IdTelnet1.WriteLn('/ ip hotspot user add name='+frmData.dbLogin.Text+' password='+frmData.dbPassword.Text+' profile='+frmData.dblcPlanos.Text+' comment='+frmData.dbAutoInc.Text+' disabled=no');
//ALTERA MAC
frmCommunication.IdTelnet1.WriteLn('/');
if Length(frmData.dbID.Text)=17 then
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user add [find comment="'+frmData.tblClientsAUTOINC.Text+'"] mac-address="'+frmData.dbID.Text+'"');
end
else
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user add [find comment="'+frmData.tblClientsAUTOINC.Text+'"] mac-address=""');
end;
//ALTERA O IP
frmCommunication.IdTelnet1.WriteLn('/');
if Length(frmData.dbIPFixo.Text)>7 then
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user add [find comment="'+frmData.tblClientsAUTOINC.Text+'"] address="'+frmData.dbIPFixo.Text+'"');
end
else
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user add [find comment="'+frmData.tblClientsAUTOINC.Text+'"] address');
end;
//LIBERA OU BLOQUEIA CLIENTE
frmCommunication.IdTelnet1.WriteLn('/');
if frmData.dbSuspenso.Checked=True then
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user edit [find comment="'+frmData.tblClientsAUTOINC.Text+'"] disabled=yes');
end
else
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user edit [find comment="'+frmData.tblClientsAUTOINC.Text+'"] disabled=no');
end;
//ALTERA SENHA
frmCommunication.IdTelnet1.WriteLn('/');
if frmData.dbPassword.Text<>''then
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user edit [find comment="'+frmData.tblClientsAUTOINC.Text+'"] password="'+frmData.dbPassword.Text+'"');
end
else
begin
frmCommunication.IdTelnet1.WriteLn('/ip hotspot user edit [find comment="'+frmData.tblClientsAUTOINC.Text+'"] password=""');
end;