Autor Beitrag
sauerkraut
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 70



BeitragVerfasst: Di 17.02.04 14:00 
ist es möglich einen irc client in delphi zu schreiben, und wenn ja, wie? (könnt ihr mir vielleicht n tut oder so sagen?)

Vielen Dank!

Edit:

aaaalsoooo wenn ich jetzt ins quakenet connecte bekomme ich folgendes:

NOTICE AUTH :*** Looking up your hostname
NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Found your hostname

EDIT: hoppala, nach ner minute oder so hab ich

ERROR :Closing Link: by port80b.se.quakenet.org (Ping Timeout)

bekommen ^^


mehr nicht! wenn ich mit clientsocket1.Socket.SendText(edit3.text);

versuche irgendwelche sachen wie z.B. nickname und so anzugeben passiert nix!

ausblenden volle Höhe Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ScktComp, StdCtrls;
function Hex(strData:string): string;

type
  TForm1 = class(TForm)
    memo1: TMemo;
    button1: TButton;
    clientSocket1: TClientSocket;
    edit1: TEdit;
    edit2: TEdit;
    edit3: TEdit;
    button2: TButton;
    procedure button1Click(Sender: TObject);
   
    procedure clientSocket1Connecting(Sender: TObject;
      Socket: TCustomWinSocket);
    procedure clientSocket1Connect(Sender: TObject;
      Socket: TCustomWinSocket);

    procedure button2Click(Sender: TObject);
    procedure clientSocket1Read(Sender: TObject; Socket: TCustomWinSocket);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function Hex(strData:string): string;
var sresult:string; sfinal:string; hexc:cardinal; i:integer;
begin
  i:=1;
  while i<=length(strData) do
    begin
      hexc := strtoint('$' + copy(strData,i,2));
      sresult :=  inttostr(hexc);
      sresult := chr(strtoint(sresult));
      sfinal := sfinal + sresult;
      i:=i+2;
    end;
  result := sfinal
end;

procedure TForm1.button1Click(Sender: TObject);
begin
clientsocket1.Host:=edit1.text;
clientsocket1.Port:=strtoint(edit2.Text);
clientsocket1.active:=true;

end;



procedure TForm1.clientSocket1Connecting(Sender: TObject;
  Socket: TCustomWinSocket);
begin
memo1.Text := 'Versuche zu verbinden...';
end;
procedure TForm1.clientSocket1Connect(Sender: TObject;
  Socket: TCustomWinSocket);
begin
memo1.Text := 'Verbunden!';
end;



procedure TForm1.button2Click(Sender: TObject);
begin
clientsocket1.Socket.SendText(edit3.text);
end;

procedure TForm1.clientSocket1Read(Sender: TObject;
  Socket: TCustomWinSocket);
begin
memo1.text := memo1.text + clientsocket1.Socket.ReceiveText;
end;

end.



HILFÄÄä :D

Edit 2:

soo jetzt krieg ich folgendes:

Verbunden!
Lokale Adresse: 192.168.0.2
Remote Host: irc.playerofgames.com
USER: Delphi "192.168.0.2" "irc.playerofgames.com" :Delphi Test

NOTICE AUTH :*** Looking up your hostname
NOTICE AUTH :*** Checking Ident
NOTICE AUTH :*** Found your hostname
PING :1411489672
PONG 1411489672
ERROR :Closing Link: Delphi-TestUser by ign.ie.quakenet.org (Ping Timeout)


aber wenn ich versuche was zu machen(channel joinen) sagt er ich soll mich registrieren! nun vermute ich, dass das in dem USER teil liegt! momentan benutze ich dafür:
clientsocket1.Socket.SendText('USER Delphi "' + clientsocket1.Socket.LocalAddress + '" "' + clientsocket1.Socket.RemoteHost + '" :Delphi Test' + hex('0A'));

daran kann was nicht stimmen!
ausserdem funzt das Pongen nicht, da ich immer wieder outtime!

clientsocket1.Socket.SendText('PONG ' + copy(idata,pos(':',idata) + 1,length(idata) - pos(':',idata)));

wer sich mit irc auskennt BITTE HILF! daaankeee

Edit 3:

ok nun bin ich so weit dass ich mich einloggen kann, nur scheint das programm die motd als eine art spamm anzusehen, und stoppt mittendrin die übertragung!

Moderiert von user profile iconTino: Topic aus VCL (Visual Component Library) verschoben am Mo 16.08.2004 um 09:27
Moderiert von user profile iconUdontknow: Beiträge zusammengefasst (zum Ersten...).
Moderiert von user profile iconUdontknow: Beiträge zusammengefasst (zum Zweiten...).
Moderiert von user profile iconUdontknow: Beiträge zusammengefasst (zum Dritten - Verkauft! ).
NuCHiLL
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 37

WXP
D7E
BeitragVerfasst: Mi 17.03.04 12:53 
warum nimmste nich die indy-kompo "IDIRC"?

_________________
-I am what I am and I do what I can-
Jonny-noob
Hält's aus hier
Beiträge: 3

Win XP
D7 Enterprise
BeitragVerfasst: Mo 16.08.04 06:37 
Hi, ich bin neu und woltle nachfragen woher ich diese idIRC herbekomme und ob es kostenlos ist,

MFG Jonny
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 16.08.04 09:15 
:welcome:
Eigentlich gilt hier, neue Frage -> neuer Thread:
www.indyproject.org und ja, es ist kostenlos.

raziel

_________________
JSXGraph
Jonny-noob
Hält's aus hier
Beiträge: 3

Win XP
D7 Enterprise
BeitragVerfasst: Mo 16.08.04 09:44 
Entschuldigung, und sry aber diese seite meine ich, ich weiss nicht was genau man sich da runterladen soll, könnte man mir vielleicht einen direkten download link geben?

MFG Jonny
raziel
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 2453

Arch Linux
JS (WebStorm), C#, C++/CLI, C++ (VS2013)
BeitragVerfasst: Mo 16.08.04 10:06 

_________________
JSXGraph
Jonny-noob
Hält's aus hier
Beiträge: 3

Win XP
D7 Enterprise
BeitragVerfasst: Mo 16.08.04 10:45 
Ich danke dir :D