Добро пожаловать в форум, Guest  >>   Войти | Регистрация | Поиск | Правила | В избранное | Подписаться
Все форумы / Delphi Новый топик    Ответить
 IRC клиент-сервер из компонентов Indy. Не могу подключиться к серверу...  [new]
k.besedin
Member

Откуда:
Сообщений: 10
Доброго всем вечера, уважаемые профи....
Использую компоненты Delphi 10.2 Tokey - Indy (TIdIRCServer, TIdIRC).
Много перегуглил, перечитал.. но так и не могу понять как подключиться и работать с этими компонентами, нужен простенький локальный чат, со специфическими задачами...
Выходит ошибка (прилагаю скриншот)
7 ноя 18, 18:13    [21727210]     Ответить | Цитировать Сообщить модератору
 Re: IRC клиент-сервер из компонентов Indy. Не могу подключиться к серверу...  [new]
k.besedin
Member

Откуда:
Сообщений: 10


К сообщению приложен файл. Размер - 69Kb
7 ноя 18, 18:47    [21727242]     Ответить | Цитировать Сообщить модератору
 Re: IRC клиент-сервер из компонентов Indy. Не могу подключиться к серверу...  [new]
k.besedin
Member

Откуда:
Сообщений: 10
Клиентский код
+

unit Unit3;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, IdBaseComponent,
  IdComponent, IdTCPConnection, IdTCPClient, IdCmdTCPClient, IdIRC, Vcl.ExtCtrls,
  IdContext;

type
  TForm3 = class(TForm)
    Client: TIdIRC;
    Panel1: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Edit3: TEdit;
    Button1: TButton;
    Button2: TButton;
    Memo1: TMemo;
    procedure FormCreate(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure ClientAdminInfoReceived(ASender: TIdContext;
      AAdminInfo: TStrings);
    procedure ClientAfterBind(Sender: TObject);
    procedure ClientAfterCommandHandler(ASender: TIdCmdTCPClient;
      AContext: TIdContext);
    procedure ClientAway(ASender: TIdContext; const ANickname, AHost,
      AAwayMessage: string; UserAway: Boolean);
    procedure ClientBanListReceived(ASender: TIdContext; const AChannel: string;
      ABanList: TStrings);
    procedure ClientBeforeBind(Sender: TObject);
    procedure ClientBeforeCommandHandler(ASender: TIdCmdTCPClient;
      var AData: string; AContext: TIdContext);
    procedure ClientBounce(ASender: TIdContext; const AHost: string;
      APort: Integer; const AInfo: string);
    procedure ClientChannelMode(ASender: TIdContext; const ANickname, AHost,
      AChannel, AMode, AParams: string);
    procedure ClientConnected(Sender: TObject);
    procedure ClientCTCPQuery(ASender: TIdContext; const ANickname, AHost,
      ATarget, ACommand, AParams: string);
    procedure ClientCTCPReply(ASender: TIdContext; const ANickname, AHost,
      ATarget, ACommand, AParams: string);
    procedure ClientDCCAccept(ASender: TIdContext; const ANickname, AHost,
      AFilename: string; APort: Word; AFilePos: Int64);
    procedure ClientDCCChat(ASender: TIdContext; const ANickname, AHost: string;
      APort: Integer);
    procedure ClientDCCResume(ASender: TIdContext; const ANickname, AHost,
      AFilename: string; APort: Word; AFilePos: Int64);
    procedure ClientDCCSend(ASender: TIdContext; const ANickname, AHost,
      AFilename: string; APort: Word; AFileSize: Int64);
    procedure ClientDisconnected(Sender: TObject);
    procedure ClientExceptionListReceived(ASender: TIdContext;
      const AChannel: string; AExceptList: TStrings);
    procedure ClientInvitationListReceived(ASender: TIdContext;
      const AChannel: string; AInviteList: TStrings);
    procedure ClientInvite(ASender: TIdContext; const ANickname, AHost, ATarget,
      AChannel: string);
    procedure ClientInviting(ASender: TIdContext; const ANickname,
      AHost: string);
    procedure ClientIsOnIRC(ASender: TIdContext; const ANickname,
      AHost: string);
    procedure ClientISupport(ASender: TIdContext; AParameters: TStrings);
    procedure ClientJoin(ASender: TIdContext; const ANickname, AHost,
      AChannel: string);
    procedure ClientKick(ASender: TIdContext; const ANickname, AHost, AChannel,
      ATarget, AReason: string);
    procedure ClientKill(ASender: TIdContext; const ANickname, AHost,
      ATargetNickname, AReason: string);
    procedure ClientKillError(ASender: TIdContext);
    procedure ClientKnownServersListReceived(ASender: TIdContext;
      AKnownServers: TStrings);
    procedure ClientMOTD(ASender: TIdContext; AMOTD: TStrings);
    procedure ClientMyInfo(ASender: TIdContext; const AServer, AVersion,
      AUserModes, AChanModes, AExtra: string);
    procedure ClientNicknameChange(ASender: TIdContext; const AOldNickname,
      AHost, ANewNickname: string);
    procedure ClientNicknameError(ASender: TIdContext; AError: Integer);
    procedure ClientNicknamesListReceived(ASender: TIdContext;
      const AChannel: string; ANicknameList: TStrings);
    procedure ClientNotice(ASender: TIdContext; const ANickname, AHost, ATarget,
      ANotice: string);
    procedure ClientOp(ASender: TIdContext; const ANickname, AChannel,
      AHost: string);
    procedure ClientPart(ASender: TIdContext; const ANickname, AHost, AChannel,
      APartMessage: string);
    procedure ClientPingPong(ASender: TIdContext);
    procedure ClientPrivateMessage(ASender: TIdContext; const ANickname, AHost,
      ATarget, AMessage: string);
    procedure ClientQuit(ASender: TIdContext; const ANickname, AHost,
      AReason: string);
    procedure ClientRaw(ASender: TIdContext; AIn: Boolean;
      const AMessage: string);
    procedure ClientRehash(ASender: TIdContext; const ANickname, AHost: string);
    procedure ClientServerCreated(ASender: TIdContext; const AMsg: string);
    procedure ClientServerError(ASender: TIdContext; AErrorCode: Integer;
      const AErrorMessage: string);
    procedure ClientServerListReceived(ASender: TIdContext;
      AServerList: TStrings);
    procedure ClientServerQuit(ASender: TIdContext; const ANickname, AHost,
      AServer, AReason: string);
    procedure ClientServerStatsReceived(ASender: TIdContext; AStatus: TStrings);
    procedure ClientServerTime(ASender: TIdContext; const AHost, ATime: string);
    procedure ClientServerUsersListReceived(ASender: TIdContext;
      AUsers: TStrings);
    procedure ClientServerVersion(ASender: TIdContext; const AVersion, AHost,
      AComments: string);
    procedure ClientServerWelcome(ASender: TIdContext; const AMsg: string);
    procedure ClientService(ASender: TIdContext);
    procedure ClientSocketAllocated(Sender: TObject);
    procedure ClientStatus(ASender: TObject; const AStatus: TIdStatus;
      const AStatusText: string);
    procedure ClientSummon(ASender: TIdContext; const ANickname, AHost: string);
    procedure ClientTopic(ASender: TIdContext; const ANickname, AHost, AChannel,
      ATopic: string);
    procedure ClientTrace(ASender: TIdContext; ATraceInfo: TStrings);
    procedure ClientUserInfoReceived(ASender: TIdContext;
      const AUserInfo: string);
    procedure ClientUserMode(ASender: TIdContext; const ANickname, AHost,
      AMode: string);
    procedure ClientWallops(ASender: TIdContext; const ANickname, AHost,
      AMessage: string);
    procedure ClientWho(ASender: TIdContext; AWhoResults: TStrings);
    procedure ClientWhoIs(ASender: TIdContext; AWhoIsResults: TStrings);
    procedure ClientWhoWas(ASender: TIdContext; AWhoWasResults: TStrings);
    procedure ClientWork(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCount: Int64);
    procedure ClientWorkBegin(ASender: TObject; AWorkMode: TWorkMode;
      AWorkCountMax: Int64);
    procedure ClientWorkEnd(ASender: TObject; AWorkMode: TWorkMode);
    procedure ClientYourHost(ASender: TIdContext; const AMsg: string);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.Button1Click(Sender: TObject);
begin
 Client.Host:=edit1.Text;
 Client.Port:=Integer(edit2.Text);
 Client.Nickname:=edit3.Text;
 Client.Connect;
end;

procedure TForm3.Button2Click(Sender: TObject);
begin
 Client.Disconnect('see you later!)');
end;

procedure TForm3.ClientAdminInfoReceived(ASender: TIdContext;
  AAdminInfo: TStrings);
begin
 memo1.Lines.Add('ClientAdminInfoReceived');
end;

procedure TForm3.ClientAfterBind(Sender: TObject);
begin
 memo1.Lines.Add('ClientAfterBind');
end;

procedure TForm3.ClientAfterCommandHandler(ASender: TIdCmdTCPClient;
  AContext: TIdContext);
begin
memo1.Lines.Add('ClientAfterCommandHandler');
end;

procedure TForm3.ClientAway(ASender: TIdContext; const ANickname, AHost,
  AAwayMessage: string; UserAway: Boolean);
begin
memo1.Lines.Add('ClientAway');
end;

procedure TForm3.ClientBanListReceived(ASender: TIdContext;
  const AChannel: string; ABanList: TStrings);
begin
memo1.Lines.Add('ClientBanListReceived');
end;

procedure TForm3.ClientBeforeBind(Sender: TObject);
begin
memo1.Lines.Add('ClientBeforeBind');
end;

procedure TForm3.ClientBeforeCommandHandler(ASender: TIdCmdTCPClient;
  var AData: string; AContext: TIdContext);
begin
 memo1.Lines.Add('ClientBeforeCommandHandler');

end;

procedure TForm3.ClientBounce(ASender: TIdContext; const AHost: string;
  APort: Integer; const AInfo: string);
begin
 memo1.Lines.Add('ClientBounce');
end;

procedure TForm3.ClientChannelMode(ASender: TIdContext; const ANickname, AHost,
  AChannel, AMode, AParams: string);
begin
 memo1.Lines.Add('ClientChannelMode');
end;

procedure TForm3.ClientConnected(Sender: TObject);
begin
 memo1.Lines.Add('ClientConnected');
end;

procedure TForm3.ClientCTCPQuery(ASender: TIdContext; const ANickname, AHost,
  ATarget, ACommand, AParams: string);
begin
 memo1.Lines.Add('ClientCTCPQuery');
end;

procedure TForm3.ClientCTCPReply(ASender: TIdContext; const ANickname, AHost,
  ATarget, ACommand, AParams: string);
begin
 memo1.Lines.Add('ClientCTCPReply');
end;

procedure TForm3.ClientDCCAccept(ASender: TIdContext; const ANickname, AHost,
  AFilename: string; APort: Word; AFilePos: Int64);
begin
 memo1.Lines.Add('ClientDCCAccept');
end;

procedure TForm3.ClientDCCChat(ASender: TIdContext; const ANickname,
  AHost: string; APort: Integer);
begin
 memo1.Lines.Add('ClientDCCChat');
end;

procedure TForm3.ClientDCCResume(ASender: TIdContext; const ANickname, AHost,
  AFilename: string; APort: Word; AFilePos: Int64);
begin
 memo1.Lines.Add('ClientDCCResume');
end;

procedure TForm3.ClientDCCSend(ASender: TIdContext; const ANickname, AHost,
  AFilename: string; APort: Word; AFileSize: Int64);
begin
 memo1.Lines.Add('ClientDCCSend');
end;

procedure TForm3.ClientDisconnected(Sender: TObject);
begin
 memo1.Lines.Add('ClientDisconnected');
end;

procedure TForm3.ClientExceptionListReceived(ASender: TIdContext;
  const AChannel: string; AExceptList: TStrings);
begin
 memo1.Lines.Add('ClientExceptionListReceived');
end;

procedure TForm3.ClientInvitationListReceived(ASender: TIdContext;
  const AChannel: string; AInviteList: TStrings);
begin
 memo1.Lines.Add('ClientInvitationListReceived');
end;

procedure TForm3.ClientInvite(ASender: TIdContext; const ANickname, AHost,
  ATarget, AChannel: string);
begin
 memo1.Lines.Add('ClientInvite');
end;

procedure TForm3.ClientInviting(ASender: TIdContext; const ANickname,
  AHost: string);
begin
 memo1.Lines.Add('ClientInviting');
end;

procedure TForm3.ClientIsOnIRC(ASender: TIdContext; const ANickname,
  AHost: string);
begin
 memo1.Lines.Add('ClientIsOnIRC');
end;

procedure TForm3.ClientISupport(ASender: TIdContext; AParameters: TStrings);
begin
memo1.Lines.Add('ClientISupport');
end;

procedure TForm3.ClientJoin(ASender: TIdContext; const ANickname, AHost,
  AChannel: string);
begin
memo1.Lines.Add('ClientJoin');
end;

procedure TForm3.ClientKick(ASender: TIdContext; const ANickname, AHost,
  AChannel, ATarget, AReason: string);
begin
memo1.Lines.Add('ClientKick');
end;

procedure TForm3.ClientKill(ASender: TIdContext; const ANickname, AHost,
  ATargetNickname, AReason: string);
begin
memo1.Lines.Add('ClientKill');
end;

procedure TForm3.ClientKillError(ASender: TIdContext);
begin
memo1.Lines.Add('ClientKillError');
end;

procedure TForm3.ClientKnownServersListReceived(ASender: TIdContext;
  AKnownServers: TStrings);
begin
memo1.Lines.Add('ClientKnownServersListReceived');
end;

procedure TForm3.ClientMOTD(ASender: TIdContext; AMOTD: TStrings);
begin
memo1.Lines.Add('ClientMOTD');
end;

procedure TForm3.ClientMyInfo(ASender: TIdContext; const AServer, AVersion,
  AUserModes, AChanModes, AExtra: string);
begin
memo1.Lines.Add('ClientMyInfo');
end;

procedure TForm3.ClientNicknameChange(ASender: TIdContext; const AOldNickname,
  AHost, ANewNickname: string);
begin
memo1.Lines.Add('ClientNicknameChange');
end;

procedure TForm3.ClientNicknameError(ASender: TIdContext; AError: Integer);
begin
memo1.Lines.Add('ClientNicknameError');
end;

procedure TForm3.ClientNicknamesListReceived(ASender: TIdContext;
  const AChannel: string; ANicknameList: TStrings);
begin
memo1.Lines.Add('ClientNicknamesListReceived');
end;

procedure TForm3.ClientNotice(ASender: TIdContext; const ANickname, AHost,
  ATarget, ANotice: string);
begin
memo1.Lines.Add('ClientNotice');
end;

procedure TForm3.ClientOp(ASender: TIdContext; const ANickname, AChannel,
  AHost: string);
begin
memo1.Lines.Add('ClientOp');
end;

procedure TForm3.ClientPart(ASender: TIdContext; const ANickname, AHost,
  AChannel, APartMessage: string);
begin
memo1.Lines.Add('ClientPart');
end;

procedure TForm3.ClientPingPong(ASender: TIdContext);
begin
memo1.Lines.Add('ClientPingPong');
end;

procedure TForm3.ClientPrivateMessage(ASender: TIdContext; const ANickname,
  AHost, ATarget, AMessage: string);
begin
memo1.Lines.Add('ClientPrivateMessage');
end;

procedure TForm3.ClientQuit(ASender: TIdContext; const ANickname, AHost,
  AReason: string);
begin
memo1.Lines.Add('ClientQuit');
end;

procedure TForm3.ClientRaw(ASender: TIdContext; AIn: Boolean;
  const AMessage: string);
begin
memo1.Lines.Add('ClientRaw');
end;

procedure TForm3.ClientRehash(ASender: TIdContext; const ANickname,
  AHost: string);
begin
memo1.Lines.Add('ClientRehash');
end;

procedure TForm3.ClientServerCreated(ASender: TIdContext; const AMsg: string);
begin
memo1.Lines.Add('ClientServerCreated');
end;

procedure TForm3.ClientServerError(ASender: TIdContext; AErrorCode: Integer;
  const AErrorMessage: string);
begin
memo1.Lines.Add('ClientServerError');
end;

procedure TForm3.ClientServerListReceived(ASender: TIdContext;
  AServerList: TStrings);
begin
memo1.Lines.Add('ClientServerListReceived');
end;

procedure TForm3.ClientServerQuit(ASender: TIdContext; const ANickname, AHost,
  AServer, AReason: string);
begin
memo1.Lines.Add('ClientServerQuit');
end;

procedure TForm3.ClientServerStatsReceived(ASender: TIdContext;
  AStatus: TStrings);
begin
memo1.Lines.Add('ClientServerStatsReceived');
end;

procedure TForm3.ClientServerTime(ASender: TIdContext; const AHost,
  ATime: string);
begin
memo1.Lines.Add('ClientServerTime');
end;

procedure TForm3.ClientServerUsersListReceived(ASender: TIdContext;
  AUsers: TStrings);
begin
memo1.Lines.Add('ClientServerUsersListReceived');
end;

procedure TForm3.ClientServerVersion(ASender: TIdContext; const AVersion, AHost,
  AComments: string);
begin
memo1.Lines.Add('ClientServerVersion');
end;

procedure TForm3.ClientServerWelcome(ASender: TIdContext; const AMsg: string);
begin
memo1.Lines.Add('ClientServerWelcome');
end;

procedure TForm3.ClientService(ASender: TIdContext);
begin
memo1.Lines.Add('ClientService');
end;

procedure TForm3.ClientSocketAllocated(Sender: TObject);
begin
memo1.Lines.Add('ClientSocketAllocated');
end;

procedure TForm3.ClientStatus(ASender: TObject; const AStatus: TIdStatus;
  const AStatusText: string);
begin
memo1.Lines.Add('ClientStatus');
end;

procedure TForm3.ClientSummon(ASender: TIdContext; const ANickname,
  AHost: string);
begin
memo1.Lines.Add('ClientSummon');
end;

procedure TForm3.ClientTopic(ASender: TIdContext; const ANickname, AHost,
  AChannel, ATopic: string);
begin
memo1.Lines.Add('ClientTopic');
end;

procedure TForm3.ClientTrace(ASender: TIdContext; ATraceInfo: TStrings);
begin
memo1.Lines.Add('ClientTrace');
end;

procedure TForm3.ClientUserInfoReceived(ASender: TIdContext;
  const AUserInfo: string);
begin
memo1.Lines.Add('ClientUserInfoReceived');
end;

procedure TForm3.ClientUserMode(ASender: TIdContext; const ANickname, AHost,
  AMode: string);
begin
memo1.Lines.Add('ClientUserMode');
end;

procedure TForm3.ClientWallops(ASender: TIdContext; const ANickname, AHost,
  AMessage: string);
begin
memo1.Lines.Add('ClientWallops');
end;

procedure TForm3.ClientWho(ASender: TIdContext; AWhoResults: TStrings);
begin
memo1.Lines.Add('ClientWho');
end;

procedure TForm3.ClientWhoIs(ASender: TIdContext; AWhoIsResults: TStrings);
begin
memo1.Lines.Add('ClientWhoIs');
end;

procedure TForm3.ClientWhoWas(ASender: TIdContext; AWhoWasResults: TStrings);
begin
memo1.Lines.Add('ClientWhoWas');
end;

procedure TForm3.ClientWork(ASender: TObject; AWorkMode: TWorkMode;
  AWorkCount: Int64);
begin
memo1.Lines.Add('ClientWork');
end;

procedure TForm3.ClientWorkBegin(ASender: TObject; AWorkMode: TWorkMode;
  AWorkCountMax: Int64);
begin
memo1.Lines.Add('ClientWorkBegin');
end;

procedure TForm3.ClientWorkEnd(ASender: TObject; AWorkMode: TWorkMode);
begin
memo1.Lines.Add('ClientWorkEnd');
end;

procedure TForm3.ClientYourHost(ASender: TIdContext; const AMsg: string);
begin
memo1.Lines.Add('ClientYourHost');
end;

procedure TForm3.FormCreate(Sender: TObject);
begin
  edit1.Text:='localhost';
  edit2.Text:='6667';
  edit3.Text:='k.besedin';
end;

end.



Серверный код
+

unit Unit3;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, IdCommandHandlers, Vcl.StdCtrls,
  IdBaseComponent, IdComponent, IdCustomTCPServer, IdTCPServer, IdCmdTCPServer,
  IdIrcServer, IdContext, IdSocketHandle, IdThread, Vcl.ExtCtrls;

type
  TForm3 = class(TForm)
    Server: TIdIRCServer;
    Memo1: TMemo;
    Panel1: TPanel;
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    Label1: TLabel;
    procedure ServerCommandJoin(AContext: TIdCommand; AParm1,
      AParm2: string);
    procedure ServerAfterBind(Sender: TObject);
    procedure ServerAfterCommandHandler(ASender: TIdCmdTCPServer;
      AContext: TIdContext);
    procedure ServerBeforeBind(AHandle: TIdSocketHandle);
    procedure ServerBeforeCommandHandler(ASender: TIdCmdTCPServer;
      var AData: string; AContext: TIdContext);
    procedure ServerBeforeListenerRun(AThread: TIdThread);
    procedure ServerCommandAdmin(AContext: TIdCommand; AParm: string);
    procedure ServerCommandAway(AContext: TIdCommand; AParm: string);
    procedure ServerCommandConnect(AContext: TIdCommand; AParm1, AParm2,
      AParm3: string);
    procedure ServerCommandError(AContext: TIdCommand; AParm: string);
    procedure ServerCommandInfo(AContext: TIdCommand; AParm: string);
    procedure ServerCommandInvite(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandIsOn(AContext: TIdCommand; AParm: string);
    procedure ServerCommandKick(AContext: TIdCommand; AParm1, AParm2,
      AParm3: string);
    procedure ServerCommandKill(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandLinks(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandList(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandMode(AContext: TIdCommand; AParm1, AParm2, AParm3,
      AParm4, AParm5: string);
    procedure ServerCommandNames(AContext: TIdCommand; AParm: string);
    procedure ServerCommandNotice(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandOper(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandOther(AContext: TIdCommand; Command, AParm: string);
    procedure ServerCommandPart(AContext: TIdCommand; AParm: string);
    procedure ServerCommandPass(AContext: TIdCommand; AParm: string);
    procedure ServerCommandPing(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandPong(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandPrivMsg(AContext: TIdCommand; AParm1,
      AParm2: string);
    procedure ServerCommandQuit(AContext: TIdCommand; AParm: string);
    procedure ServerCommandRehash(AContext: TIdCommand);
    procedure ServerCommandRestart(AContext: TIdCommand);
    procedure ServerCommandServer(AContext: TIdCommand; ServerName, Hopcount,
      Info: string);
    procedure ServerCommandSQuit(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandStats(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandSummon(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandTime(AContext: TIdCommand; AParm: string);
    procedure ServerCommandTopic(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandTrace(AContext: TIdCommand; AParm: string);
    procedure ServerCommandUsers(AContext: TIdCommand; AParm: string);
    procedure ServerCommandVersion(AContext: TIdCommand; AParm: string);
    procedure ServerCommandWallops(AContext: TIdCommand; AParm: string);
    procedure ServerCommandWho(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandWhoIs(AContext: TIdCommand; AParm1, AParm2: string);
    procedure ServerCommandWhoWas(AContext: TIdCommand; AParm1, AParm2,
      AParm3: string);
    procedure ServerConnect(AContext: TIdContext);
    procedure ServerContextCreated(AContext: TIdContext);
    procedure ServerDisconnect(AContext: TIdContext);
    procedure ServerException(AContext: TIdContext; AException: Exception);
    procedure ServerExecute(AContext: TIdContext);
    procedure ServerListenException(AThread: TIdListenerThread;
      AException: Exception);
    procedure ServerStatus(ASender: TObject; const AStatus: TIdStatus;
      const AStatusText: string);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.dfm}

procedure TForm3.Button1Click(Sender: TObject);
begin
 Server.DefaultPort:=integer(edit1.Text);
 Server.Active:=true;
end;

procedure TForm3.Button2Click(Sender: TObject);
begin
 Server.Active:=false;
end;

procedure TForm3.ServerAfterBind(Sender: TObject);
begin
 memo1.Lines.Add('ServerAfterBind');
end;

procedure TForm3.ServerAfterCommandHandler(ASender: TIdCmdTCPServer;
  AContext: TIdContext);
begin
 memo1.Lines.Add('ServerAfterCommandHandler');
end;

procedure TForm3.ServerBeforeBind(AHandle: TIdSocketHandle);
begin
 memo1.Lines.Add('ServerBeforeBind');
end;

procedure TForm3.ServerBeforeCommandHandler(ASender: TIdCmdTCPServer;
  var AData: string; AContext: TIdContext);
begin
 memo1.Lines.Add('ServerBeforeCommandHandler');
end;

procedure TForm3.ServerBeforeListenerRun(AThread: TIdThread);
begin
 memo1.Lines.Add('ServerBeforeListenerRun');
end;

procedure TForm3.ServerCommandAdmin(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandAdmin');
end;

procedure TForm3.ServerCommandAway(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandAway');
end;

procedure TForm3.ServerCommandConnect(AContext: TIdCommand; AParm1, AParm2,
  AParm3: string);
begin
 memo1.Lines.Add('ServerCommandConnect');
end;

procedure TForm3.ServerCommandError(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandError');
end;

procedure TForm3.ServerCommandInfo(AContext: TIdCommand; AParm: string);
begin
      memo1.Lines.Add('ServerCommandInfo');

end;

procedure TForm3.ServerCommandInvite(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandInvite');
end;

procedure TForm3.ServerCommandIsOn(AContext: TIdCommand; AParm: string);
begin
  memo1.Lines.Add('ServerCommandIsOn');
end;

procedure TForm3.ServerCommandJoin(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
  memo1.Lines.Add('IdIRCServer1CommandJoin');
end;

procedure TForm3.ServerCommandKick(AContext: TIdCommand; AParm1, AParm2,
  AParm3: string);
begin
 memo1.Lines.Add('ServerCommandKick');
end;

procedure TForm3.ServerCommandKill(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandKill');
end;

procedure TForm3.ServerCommandLinks(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandLinks');
end;

procedure TForm3.ServerCommandList(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandList');
end;

procedure TForm3.ServerCommandMode(AContext: TIdCommand; AParm1, AParm2, AParm3,
  AParm4, AParm5: string);
begin
 memo1.Lines.Add('ServerCommandMode');
end;

procedure TForm3.ServerCommandNames(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandNames');
end;

procedure TForm3.ServerCommandNotice(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandNotice');
end;

procedure TForm3.ServerCommandOper(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandOper');
end;

procedure TForm3.ServerCommandOther(AContext: TIdCommand; Command,
  AParm: string);
begin
 memo1.Lines.Add('ServerCommandOther');
end;

procedure TForm3.ServerCommandPart(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandPart');
end;

procedure TForm3.ServerCommandPass(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandPass');
end;

procedure TForm3.ServerCommandPing(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandPing');
end;

procedure TForm3.ServerCommandPong(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandPong');
end;

procedure TForm3.ServerCommandPrivMsg(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
 memo1.Lines.Add('ServerCommandPrivMsg');
end;

procedure TForm3.ServerCommandQuit(AContext: TIdCommand; AParm: string);
begin
 memo1.Lines.Add('ServerCommandQuit');
end;

procedure TForm3.ServerCommandRehash(AContext: TIdCommand);
begin
 memo1.Lines.Add('ServerCommandRehash');
end;

procedure TForm3.ServerCommandRestart(AContext: TIdCommand);
begin
 memo1.Lines.Add('ServerCommandRestart');
end;

procedure TForm3.ServerCommandServer(AContext: TIdCommand; ServerName, Hopcount,
  Info: string);
begin
     memo1.Lines.Add('ServerCommandServer');
end;

procedure TForm3.ServerCommandSQuit(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandSQuit');
end;

procedure TForm3.ServerCommandStats(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandStats');
end;

procedure TForm3.ServerCommandSummon(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandSummon');
end;

procedure TForm3.ServerCommandTime(AContext: TIdCommand; AParm: string);
begin
     memo1.Lines.Add('ServerCommandTime');
end;

procedure TForm3.ServerCommandTopic(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandTopic');
end;

procedure TForm3.ServerCommandTrace(AContext: TIdCommand; AParm: string);
begin
     memo1.Lines.Add('ServerCommandTrace');
end;

procedure TForm3.ServerCommandUsers(AContext: TIdCommand; AParm: string);
begin
     memo1.Lines.Add('ServerCommandUsers');
end;

procedure TForm3.ServerCommandVersion(AContext: TIdCommand; AParm: string);
begin
     memo1.Lines.Add('ServerCommandVersion');
end;

procedure TForm3.ServerCommandWallops(AContext: TIdCommand; AParm: string);
begin
     memo1.Lines.Add('ServerCommandWallops');
end;

procedure TForm3.ServerCommandWho(AContext: TIdCommand; AParm1, AParm2: string);
begin
     memo1.Lines.Add('ServerCommandWho');
end;

procedure TForm3.ServerCommandWhoIs(AContext: TIdCommand; AParm1,
  AParm2: string);
begin
     memo1.Lines.Add('ServerCommandWhoIs');
end;

procedure TForm3.ServerCommandWhoWas(AContext: TIdCommand; AParm1, AParm2,
  AParm3: string);
begin
     memo1.Lines.Add('ServerCommandWhoWas');
end;

procedure TForm3.ServerConnect(AContext: TIdContext);
begin
     memo1.Lines.Add('ServerConnect');
end;

procedure TForm3.ServerContextCreated(AContext: TIdContext);
begin
     memo1.Lines.Add('ServerContextCreated');
end;

procedure TForm3.ServerDisconnect(AContext: TIdContext);
begin
     memo1.Lines.Add('ServerDisconnect');
end;

procedure TForm3.ServerException(AContext: TIdContext; AException: Exception);
begin
     memo1.Lines.Add('ServerException');
end;

procedure TForm3.ServerExecute(AContext: TIdContext);
begin
     memo1.Lines.Add('ServerExecute');
end;

procedure TForm3.ServerListenException(AThread: TIdListenerThread;
  AException: Exception);
begin
    memo1.Lines.Add('ServerListenException');
end;

procedure TForm3.ServerStatus(ASender: TObject; const AStatus: TIdStatus;
  const AStatusText: string);
begin
    memo1.Lines.Add('ServerStatus');
end;

end.

7 ноя 18, 18:51    [21727247]     Ответить | Цитировать Сообщить модератору
 Re: IRC клиент-сервер из компонентов Indy. Не могу подключиться к серверу...  [new]
k.besedin
Member

Откуда:
Сообщений: 10
Ребят, неужели никто не пытался создать примитивное общение по этому протоколу с этими компонентами? Выручайте. Я создал чат, который дергает по TTask задачам http веб сервис, там все шифруется, но только вот трафик огромнейший и нет моментальных оповещений....
7 ноя 18, 19:35    [21727306]     Ответить | Цитировать Сообщить модератору
 Re: IRC клиент-сервер из компонентов Indy. Не могу подключиться к серверу...  [new]
makhaon
Member

Откуда: A galaxy far far away
Сообщений: 2922
Быстрый поиск привёл сюда:
https://www.delphipraxis.net/156661-[indy-10]-irc-client-eigenem-thread-auslagern.html
Гугл в помощь, в общем
7 ноя 18, 21:06    [21727402]     Ответить | Цитировать Сообщить модератору
Все форумы / Delphi Ответить