From Stealth Client

Jump to: navigation, search

IRC

IRCConnect

procedure IRCConnect(Host : String;Port : Word);

Connect to IRC server, host&port set in params.


Example:

 if not IRCConnected then
  begin        
    IRCSetNickName('Vizzz');
    IRCConnect('irc.quakenet.org',6667);
    while not IRCConnected do
      wait(300);
  end;   

IRCConnected

function IRCConnected : Boolean;

Status of connection to IRC-Server: True - connected, False - disconnected

Example:

if IRCConnected then
    IRCSay('some1', 'New test from Vizzzz');

IRCDisconnect

procedure IRCDisconnect;

Disconnect from IRC server


Example:

 if not IRCConnected then
  IRCDisconnect;   

IRCJoin

procedure IRCJoin(AChannel : String; AKey : String = '' );

Connect to channel with AChannel name (prefix # is required). Akey is optional param with channel key(password)

Example:

if IRCConnected then
  IRCJoin('#uos');

IRCRaw

procedure IRCRaw(ALine: String);

Send "raw" text to server, including command.

Format: COMAND_NAME value_text

Example of AWAY status

if IRCConnected then
    IRCRaw('AWAY :Games');

Example of channel leaving:

if IRCConnected then
    IRCRaw('PART #uos');

IRCSay

procedure IRCSay(ATarget : String; AMsg : String);

Send channel to user(nick)\channel.

User nickname without prefix, for channel use prefix #

Example of private message:

if IRCConnected then
    IRCSay('some1', 'New test from Vizzzz');


Example of message to channel:

if IRCConnected then
    IRCSay('#uos', 'CH test from Vizzzz');

IRCSetNickName

procedure IRCSetNickName(NickName : String);

Change\set nickname.

Nick must be set before start connect to server, otherwise some server can drop your connection!

Example:

 if not IRCConnected then
  begin        
    IRCSetNickName('Vizzz');
    IRCConnect('irc.quakenet.org',6667);
    while not IRCConnected do
      wait(300);
  end;   


Pages in category "IRC"

The following 7 pages are in this category, out of 7 total.

D

D cont.

D cont.