[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH] kirc: Channel-Vorgabe
+ kirc: #lost als Vorgabekanal hinzugefügt
Signed-off-by: Alexander Hartmut Kluth <hartmut@xxxxxxxxxx>
---
src/modules/pas/kirc/kirc.pas | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/modules/pas/kirc/kirc.pas b/src/modules/pas/kirc/kirc.pas
index 2c52c5a..5a49262 100644
--- a/src/modules/pas/kirc/kirc.pas
+++ b/src/modules/pas/kirc/kirc.pas
@@ -69,6 +69,12 @@ begin
port := '6667';
end;
+ Write('Kanal [#lost]: ');
+ ReadLn(channel);
+ if channel = '' then begin
+ channel := '#lost';
+ end;
+
repeat
Write('Nickname: ');
ReadLn(nick);
@@ -215,8 +221,10 @@ begin
end
else if command = 'ERROR' then begin
theIRCWindow.Incoming(line, 12);
- end
- else begin
+ end else if command = '376' then begin
+ WriteConn(conn, 'JOIN ' + channel + #10);
+ theIRCWindow.title := channel;
+ end else begin
theIRCWindow.Incoming(line, 8);
end;
end;
@@ -315,10 +323,11 @@ begin
inBuffer := '';
outBuffer := '';
+
while not FileEof(conn) do begin
ReadConn(conn, s);
inBuffer := inBuffer + s;
-
+
lineEnd := Pos(#10, inBuffer);
if lineEnd > 0 then begin
EvaluateIRCInput(conn, Copy(inBuffer, 1, lineEnd-1));
--
1.6.3.3