home *** CD-ROM | disk | FTP | other *** search
/ Total Network Tools 2002 / NextStepPublishing-TotalNetworkTools2002-Win95.iso / Archive / Misc Servers / RadioChat Chat-Server.exe / rc_373den.pkg / source.ext / rcinclude.pas next >
Encoding:
Pascal/Delphi Source File  |  1998-12-23  |  3.2 KB  |  75 lines

  1. (*
  2.      RadioChat Example Extension-API Library INCLUDE FILE
  3.  
  4.      Confidental property of Dirk Faust
  5.      Use this as a macro for scripting your own RC-API-Extensions
  6. *)
  7.  
  8. type TUCB=record      // ** User Control Block **
  9.        active         :Boolean;                // Active entry?
  10.        reserved1      :Integer;                // ..reserved for internal use..
  11.        UID            :String[60];             // UserID
  12.        UName          :String[40];             // Username
  13.        UZeilen        :Integer;                // Rows (for screen)
  14.        UZeilen_Made   :Integer;                // Rows processed
  15.        UColor         :String[20];             // #nnnnnn HTML-User-Color
  16.        URaum          :Integer;                // RoomID
  17.        reserved2      :Integer;                // ..reserved for internal use..
  18.        UStart         :TDateTime;              // Date+Time of last action
  19.        UPhone         :Boolean;                // TRUE = Users wants to show Phone-symbol
  20.        x_reserved0    :Integer;
  21.        x_reserved1    :Integer;
  22.        x_reserved2    :Integer;
  23.        x_reserved3    :Integer;
  24.        x_reserved4    :Integer;
  25.        x_reserved5    :Integer;
  26.        x_reserved6    :Integer;
  27.        x_reserved7    :Integer;
  28.        x_reserved8    :Integer;
  29.        x_reserved9    :Integer;
  30.      end;
  31.  
  32. type TRCB=record      // ** Room Control Block **
  33.        active         :Boolean;                // Active entry?
  34.        rname          :String[40];             // Roomname
  35.        locked         :Boolean;                // Is locked by Superuser?
  36.        reserved       :Integer;                // ..reserved for internal use..
  37.        superUID       :String[60];             // UserID of Superuser
  38.        LastLine       :Array[1..10] of String; // Last 10 Lines of "spoken" text
  39.        // Note: since V.3.71, the history (lastline) can be choosen by the user.
  40.        // In order, there may be only 1..10 lines used. Unused lines are even "" (NULL). 
  41.      end;
  42.  
  43. var TCServerInstance:DWORD;
  44.     RCWriteAll:Function(was:PChar):Boolean; stdcall;
  45.     // Write to all clients in all rooms
  46.     RCWriteUID:Function(UID, was:PChar):Boolean; stdcall;
  47.     // Write to current client
  48.     RCWriteRoom:Function(roomid:Integer; was:PChar):Boolean; stdcall;
  49.     // Write to current client
  50.     RCRoomInfo:Function(roomid:Integer):TRCB; stdcall;
  51.     // Fill RCB with data of specified room
  52.     RCUIDFromName:Function(uid:PChar; neuuid:PChar):Boolean; stdcall;
  53.     // Get UID from a name
  54.  
  55. Procedure RCExtStart(ServerInstance:DWORD); cdecl far;
  56. var temp:TFARPROC;
  57. begin
  58. (*  ShowMessage('Sample: '+IntToStr(ServerInstance));
  59.   ShowMessage('Sample @: '+IntToStr(DWORD(@ServerInstance))); *)
  60.   // ***** initialisation from RadioChat Server - DO NOT CHANGE! *****
  61.   TCServerInstance:=ServerInstance;
  62.   temp:=GetProcAddress(ServerInstance, PChar('RCWriteAll'));
  63.   RCWriteAll:=temp;
  64.   temp:=GetProcAddress(ServerInstance, PChar('RCWriteUID'));
  65.   RCWriteUID:=temp;
  66.   temp:=GetProcAddress(ServerInstance, PChar('RCWriteRoom'));
  67.   RCWriteRoom:=temp;
  68.   temp:=GetProcAddress(ServerInstance, PChar('RCRoomInfo'));
  69.   RCRoomInfo:=temp;
  70.   temp:=GetProcAddress(ServerInstance, PChar('RCUIDFromName'));
  71.   RCUIDFromName:=temp;
  72. end;
  73.  
  74.  
  75.